<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>jQuery Plugin:${} Template Tag</title>
<script type="text/javascript" src="../jquery-1.7.js"></script>
<script type="text/javascript" src="jquery.tmpl.min.js"></script>
</head>
<body>
<b>Demo 1:</b>
<ul id="demo_one"></ul>
<script id="jtt_1" type="text/x-jquery-tmpl">
<li><b>${title}</b>:${content}</li>
</script>
<script>
var demo1 = [
{title:'jQuery-template: ',content:'静态网页也可以使用模板!'},
{title:'jquery-tmpl: ',content:'http://ajax.microsoft.com/ajax/jquery.templates/beta1/jquery.tmpl.min.js'},
{title:'jquery-1.7 ',content:'http://code.jquery.com/jquery-1.7.min.js'},
{title:'jquery-template Api:',content:'http://api.jquery.com/template-tag-equal/'}
]
$("#jtt_1").tmpl( demo1 ).appendTo( "#demo_one" );
</script>
</body>
</html>
jQuery Plugin — jquery template
最新推荐文章于 2024-06-13 14:36:30 发布