contains(str)
返回匹配对象中包含字符串str的对象
<p>This is just a test.</p><p>So is this</p>
jQuery代码及功能:
function jq(){
alert($("p").contains("test").html());
}
$("p")得到两个对象,而包含字符串”test”只有一个。所有$("p").contains("test")返回 [ <p>This is just a test.</p> ]
end()
结束操作,返回到匹配元素清单上操作前的状态.
filter(expr) filter(exprs)
过滤现实匹配符合表达式的对象 exprs为数组,注意添加“[ ]”
<p>Hello</p><p>Hello Again</p><p class="selected">And Again</p>
jQuery代码及功能:
function jq(){
alert($("p").filter(".selected").html())
}
$("p")得到三个对象,$("p").contains("test")只返回class为selected的对象。
find(expr)
在匹配的对象中继续查找符合表达式的对象
<p>Hello</p><p id="a">Hello Again</p><p class="selected">And Again</p>
Query代码及功能:
function jq(){
alert($("p").find("#a").html())
}
在$("p")对象中查找id为a的对象。
is(expr)
判断对象是否符合表达式,返回boolen值
<p>Hello</p><p id="a">Hello Again</p><p class="selected">And Again</p>
Query代码及功能:
function jq(){
alert($("#a").is("p"));
}
在$("#a ")是否符合jquery表达式。
大家可以用$("#a").is("div"); ("#a").is("#a")多来测试一下
next() next(expr)
返回匹配对象剩余的兄弟节点
<p>Hello</p><p id="a">Hello Again</p><p class="selected">And Again</p>
jQuery代码及功能
function jq(){
alert($("p").next().html());
alert($("p").next(".selected").html());
}
$("p").next()返回 [ <p id="a">Hello Again</p> , <p class="selected">And Again</p> ]两个对象
$("p").next(".selected)只返回 [<p class="selected">And Again</p> ]一个对象
作者: http://www.csser.com 首先我们针对以下html源码获取p对象: divimg src="test1.jpg"/ pimg src="test2.jpg"//p/di
用jquery开始吧 这个指南是对jquery库的一个总的介绍,当然你也被要求具备javascript和DOM(文档对象模型)的相关知识。该
作者: http://www.csser.com/ jquery 函数支持的 参数总结,如有遗漏请指出,谢谢: 1、jquery 对象支持接受 html 字符串
无常翻译: http://wuchang.cnblogs.com wuChang@guet.edu.cn QQ: 3263262 Retrieved from " http://www.docs.jquery.com/
文章来源:网页设计师 1.所有的标记都必须要有一个相应的结束标记 以前在HTML中,你可以打开许多标签,例如p和li而不一定
先来看一段代码声明: !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DT
原文: 在MOZ(firefox)下使没有空格的英文折行 作者:比尔-盖帽 解决办法: IE: 在容器的css中加word-break:break-all
Google了一下,这篇文章属于老文了,鉴于它还是比较实用的文章,所以转过来,没看过的可以看一下,早就看过的就温习下,出