("#dv").css("background","red").css("background","red"); $("#dv").css( { "background" : "red" , "width" : "20px"} );css
//获取宽和高的属性值---->数字类型 var width=
("#dv").height()*2; //设置元素的宽和高--->参数能够是数字也能够是字符串
("#dv").height(height);this
("#dv").addClass("cls_1 cls_2"); 多个样式.net
("body").removeClass();3d
var result=$("#dv").hasClass("cls"); 返回值为:==true==、==false==rem
$("body").toggleClass("cls");//切换类样式字符串
//获取宽和高的属性值---->数字类型 var width=
("#dv").height()*2; //设置元素的宽和高--->参数能够是数字也能够是字符串
("#dv").height(height);io
("#dv").offset().top; $("#dv").offset({"left":200,"top":200});class
(this).scrollTop()scroll