runoops.com

参考手册 第169页

jQuery position() 方法

阅读(883)

实例 Run this code » 返回 <p> 元素的 top 和 left 位置: $("button").click(function(){ x=$("p").position(); alert("Top: " + x....

jQuery outerWidth() 方法

阅读(860)

实例 Run this code » 返回 <div> 元素的外部宽度: $("button").click(function(){ alert($("div").outerWidth()); }); 定义和用法 outerWi...

jQuery outerHeight() 方法

阅读(977)

实例 Run this code » 返回 <div> 元素的外部高度: $("button").click(function(){ alert($("div").outerHeight()); }); 定义和用法 outerH...

jQuery offsetParent() 方法

阅读(711)

实例 Run this code » 设置 <p> 元素的最近定位的祖先元素的背景颜色: $("button").click(function(){ $("p").offsetParent().css("background-c...

jQuery offset() 方法

阅读(905)

实例 Run this code » 返回 <p> 元素的偏移坐标: $("button").click(function(){ var x=$("p").offset(); alert("Top: " + x.top + " ...

jQuery insertBefore() 方法

阅读(747)

实例 Run this code » 在每个 <p> 元素前插入一个 <span> 元素: $("button").click(function(){ $("Hello world!").insertBefore("...

jQuery insertAfter() 方法

阅读(864)

实例 Run this code » 在每个 <p> 元素后插入一个 <span> 元素: $("button").click(function(){ $("Hello world!").insertAfter("p...

jQuery innerWidth() 方法

阅读(973)

实例 Run this code » 返回 <div> 元素的内部宽度: $("button").click(function(){ alert($("div").innerWidth()); }); 定义和用法 innerWi...

jQuery innerHeight() 方法

阅读(970)

实例 Run this code » 返回 <div> 元素的内部高度: $("button").click(function(){ alert($("div").innerHeight()); }); 定义和用法 innerH...

jQuery html() 方法

阅读(1013)

实例 Run this code » 改变所有 <p> 元素的内容: $("button").click(function(){ $("p").html("Hello world!"); }); 定义和用法 html() 方法设...