jQuery对象是通过jQuery包装对象后产生的对象。
jQuery对象是jQuery独有的。
注意事项:
1.在jQuery对象中,无法使用DOM对象的任何方法$("#id").innerHTML;
2.在DOM对象中,也无法使用jQuery的任何方法document.getElementById("#id").html;
DOM代码如下:
$(function(){
//设置
$("#testP").html("喜欢什么运动");
//获取
alert($("#testP").html);
});