jQuery选择没有colspan属性的td的代码
2010-07-06 22:51
471 查看
复制代码 代码如下:
$("#tableName td:not([colspan])")
下面是一些补充资料:
filter()和not():
<script type="text/javascript">
$(document).ready(function() {
//输出 hello
alert($("p").filter(".selected").html());
//输出 How are you?
alert($("p").not(".selected").html());
});
</script>
</head>
<body>
<p class="selected">Hello</p><p>How are you?</p>
<!--
一个新的挑战是从一组类似或相同的元素中只选择某一个特定的元素。
jQuery提供了filter()和not()来做这个。
filter()能够将元素精简到只剩下满足过滤条件的那些,not()恰恰相反,他移除了所有满足条件的。-->
</body>
$("#tableName td:not([colspan])")
下面是一些补充资料:
filter()和not():
<script type="text/javascript">
$(document).ready(function() {
//输出 hello
alert($("p").filter(".selected").html());
//输出 How are you?
alert($("p").not(".selected").html());
});
</script>
</head>
<body>
<p class="selected">Hello</p><p>How are you?</p>
<!--
一个新的挑战是从一组类似或相同的元素中只选择某一个特定的元素。
jQuery提供了filter()和not()来做这个。
filter()能够将元素精简到只剩下满足过滤条件的那些,not()恰恰相反,他移除了所有满足条件的。-->
</body>
相关文章推荐
- jQuery选择没有colspan属性的td的代码
- jQuery选择没有colspan属性的td
- jquery选择器-根据多个属性选择示例代码
- jQuery 选择/取消 id 属性 已经选择的checkbox(java代码混用)
- jquery选择器-根据多个属性选择示例代码
- jquery选择器-根据多个属性选择示例代码
- 仿淘宝颜色属性选择展示代码(jQuery)
- 新手上路 jquery 选择器篇(三) 代码笔记
- jquery表单对象属性选择器:enabled、:disabled、:checked、:selected
- jQuery针对input的class属性写了多个值情况下的选择方法
- 这么详细的分类 MySQL源代码网站你见过没有? MySQL中的每一个方法,每一个操作,每一个函数,每一个类.每一个属性,每一个事件都有相应的范例代码
- 当td没有任何标示时,在jQuery中实现获取其在表格中的行和列:
- 基于jQuery的让非HTML5浏览器支持placeholder属性的代码(转)
- HTML <td> 标签的 colspan 属性
- jquery 自动创建form表单提交代码 下拉条 ajax模板代码 添加_移除 属性_样式
- jQuery 的属性选择器
- 为什么控件的有些属性在代码中可用,但是在设计界面的属性窗口中就没有
- jQuery选择器之属性选择器Demo
- 演示-JQuery属性选择器
- 基于jQuery的让非HTML5浏览器支持placeholder属性的代码