文章搜索:
·PHP技术论坛 ·PHP源码下载 ·招聘求职
好记性不如常笔记,学好PHP,需要养成做笔记的好习惯,马上申请我的在线笔记,终生免费>>
   你的位置: PHP教程部落 > PHP Smarty专题 > literal

literal

literal

Literal tags allow a block of data to be taken literally, not being interpreted by the Smarty engine. This is handy for things like javascript sections, where there maybe curly braces and such things that would confuse the template parser. Anything within {literal}{/literal} tags is not interpreted, but displayed as-is.

Example 7-13. literal tags

{literal}

	<script language=javascript>



        	<!--

                	function isblank(field) {

                	if (field.value == ') 

                        	{ return false; }

                	else

                        	{

                        	document.loginform.submit();

                        	return true;

                        	}

                	}

        	// -->



	</script>

{/literal}