DWRUtil.addRows数组的格式

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type='text/javascript' src='dwr/engine.js'></script>
<script type='text/javascript' src='dwr/util.js'></script>
<title>addRows</title>
</head>

<body>
<tbody id='t'>
</tbody>
</body>
</html>
<script type="text/javascript">
var user=new Object();
var user2=new Object();
var user3=new Object();
user.id=1;
user.name='a';
user2.id=2;
user2.name='b';
user3.id=3;
user3.name='c';
var arr=new Array(3);
arr[0]=user;
arr[1]=user2;
arr[2]=user3;
var cellFuctions=[function (u){return u.id;},function (u){return u.name;}];
DWRUtil.addRows('t',arr,cellFuctions);
</script>

运行后没反应,大家觉得arr的格式对吗?

你可能感兴趣的:(html,C++,c,C#)