今天在敲代码的时候,被jquery中的花括号给困惑了,先贴上两段段代码:
//片段1 $("#panel").hover(function(){ $(this).animate({height:"150",width:"300"},200); }) //片段2$('#send').click(function(){ $.get('get1.php',{username:$('#username').val(),content:$('#content').val()},function(data,textStatus){ $('#resText').html(data); }); })
好了,现在问题来了,代码中 {height:"150",width:"300"}
与{username:$('#username').val(),content:$('#content').val()}
是什么格式???很显然不是json,因为里面的height、width等没有用双引号括起来,我猜是对象,里面的height、width就是字段,而整个花括号{}就是一个整体对象,这只是我的理解,不知道大神们的理解如何?
在线急等,谢谢各位!
红颜莎娜
相关分类