http://weblogs.asp.net/scottgu/archive/2010/05/07/jquery-templates-and-data-linking-and-microsoft-contributing-to-jquery.aspx

 

<!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=gb2312" />
<title>无标题文档</title>
<script type="text/javascript" src="jquery-1.4.2.js"></script>
<script type="text/javascript" src="jquery.tmpl.js"></script>
<script type="text/javascript">
$(function(){ 

var contacts=
	[
		{ name:"dannis wu吴1",phone:"10733-13453"},
		{ name:"dannis wu吴2",phone:"20733-13453"},
		{ name:"dannis wu吴3",phone:"30733-13453"},
		{ name:"dannis wu吴4",phone:"40733-13453"}
	];
	$("#productTemplate").render(contacts).appendTo("#dvContainer");

 });


</script>
</head>

<body>
<div ></div>

<script >
<div style="border:solid 1px red" >
Name: {{= name}} <br>
phone: {{= phone}}  <!--注意=号与 phone 之间一定要有一个空格-->
</div>
</script>

</body>
</html>

 

jQuery Templates, Data Link, and Globalization Accepted as Official jQuery Plugins

 

http://weblogs.asp.net/scottgu/archive/2010/10/04/jquery-templates-data-link-and-globalization-accepted-as-official-jquery-plugins.aspx

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-05-29
  • 2021-12-31
  • 2021-07-14
  • 2021-09-18
  • 2022-12-23
  • 2021-12-23
猜你喜欢
  • 2022-12-23
  • 2021-08-03
  • 2022-12-23
  • 2021-10-15
  • 2022-12-23
  • 2021-10-31
  • 2021-07-05
相关资源
相似解决方案