定义函数为什么也要加$,求解啊
$(function(){
var stuJson=[
{name:"aa",age:"16"},
{name:"bb",age:"17"}
];
$.each(stuJson,function(index,stu){
$("body").append(index+":"+stu.name+stu.age+"<br/>");
});
});
$(function(){
var stuJson=[
{name:"aa",age:"16"},
{name:"bb",age:"17"}
];
$.each(stuJson,function(index,stu){
$("body").append(index+":"+stu.name+stu.age+"<br/>");
});
});
2015-03-03
http://www.imooc.com/code/266 这小节中有讲解,可以看这小节
举报