Reputation: 33
<!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>xxxxxxxx</title>
<style>
<!--
*{ word-wrap:break-word; outline:none; }
-->
</style>
<script language="JavaScript" type="text/javascript" src="/admin/js/jquery-1.7.2.min.js"></script>
<script language="JavaScript" type="text/javascript" src="/admin/js/jquery-jtemplates.js"></script>
<script type="text/javascript">
(function($)
{
var queryrole = function()
{
var data= [{"test":"qianyu01"}];
$("#roleidlist").setTemplateElement("roleidlist-templates").processTemplate(data);
}
$(function(){
$('#queryrole_btn').click(queryrole);
});
})(jQuery);
</script>
</head>
<body>
<div>
<input type="button" id='queryrole_btn' value="QUERY" />
<br>
<div>
<p style="display:none"><textarea id="roleidlist-templates" rows="0" cols="0">
<!--
{#foreach $T as record}
<td>{$T.record.test}</td>
{#/for}
-->
</textarea>
</p>
<div id="roleidlist">
</div>
</div>
</body>
</html>
It works fine in firefox, but can't work under ie. Help, please!3x. ei.... system tole me not enough content about the code. but really nothing else to mention.I think the code is very clear.It seems some bug in jtemplates, and which trigger the error. I'm not much experience on javascript, so can't solve this problem.Any help, please!
After more try. I delte this line:
<style>
<!--
*{ word-wrap:break-word; outline:none; }
-->
</style>
And it works! Not known why.
Upvotes: 1
Views: 248