runoops.com

参考手册 第168页

jQuery scrollLeft() 方法

阅读(821)

实例 Run this code » 返回 <div> 元素的水平滚动条位置: $("button").click(function(){ alert($("div").scrollLeft()); }); 定义和用法 scro...

jQuery replaceWith() 方法

阅读(1202)

实例 Run this code » 把第一个 <p> 元素替换为新的文本: $("button").click(function(){ $("p:first").replaceWith("Hello world!"); });...

jQuery replaceAll() 方法

阅读(855)

实例 Run this code » 把最后一个 <p> 元素替换为 <span> 元素: $("button").click(function(){ $("Hello world!").replaceAll("p:...

jQuery removeProp() 方法

阅读(744)

实例 Run this code » 添加并移除名为 "color" 的属性: $("button").click(function(){ var $x = $("div"); $x.prop("color","FF0000"); $x.a...

jQuery removeClass() 方法

阅读(857)

实例 Run this code » 从所有的 <p> 元素移除 "intro" 类: $("button").click(function(){ $("p").removeClass("intro"); }); 定义和用法 r...

jQuery removeAttr() 方法

阅读(916)

实例 Run this code » 从所有的 <p> 元素移除样式属性: $("button").click(function(){ $("p").removeAttr("style"); }); 定义和用法 removeAt...

jQuery remove() 方法

阅读(1085)

实例 Run this code » 移除所有的 <p> 元素: $("button").click(function(){ $("p").remove(); }); 定义和用法 remove() 方法移除被选元素,包括所有的文...

jQuery prop() 方法

阅读(1444)

实例 Run this code » 添加并移除名为 "color" 的属性: $("button").click(function(){ var $x = $("div"); $x.prop("color","FF0000"); $x.a...

jQuery prependTo() 方法

阅读(958)

实例 Run this code » 在每个 <p> 元素的开头插入 <span> 元素: $("button").click(function(){ $("Hello World!").prependTo("p")...

jQuery prepend() 方法

阅读(886)

实例 Run this code » 在所有 <p> 元素开头插入内容: $("button").click(function(){ $("p").prepend("Prepended text"); }); 定义和用法 pre...