jquery属性过滤选择器使用示例
2018-10-12 14:09
621 查看
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<style type="text/css">
</style>
<script src="jquery-1.9.1.js" type="text/javascript"></script>
<script type="text/javascript">
$(function () {
$('#Button1').click(function () {
//为所有具有id属性的元素设置样式,动画效果
//$('div[title]').hide(3000);
//$('div[title=t1]').hide(3000);
//$('div[title!=t1]').hide(3000);
// //属性值以t开头
//$('div[title^=t]').hide(3000
//$('div[title$=1]').hide(3000);
//$('div[title*=t]').hide(3000);
// //id值以d开始,title值以3结束
$('div[id^=d][title$=4]').hide(3000);
})
})
</script>
</head>
<body>
<div title="t1">第一层
</div>
<div id="div2" title="t2">第二层
</div>
<div id="div3" title="t3">第三层
</div>
<div id="div4" title="t4">第四层
</div>
<input id="Button1" type="button" value="click" />
</body>
</html>
您可能感兴趣的文章:
相关文章推荐
- jquery属性过滤选择器使用示例
- jquery可见性过滤选择器使用示例
- jquery可见性过滤选择器使用示例
- Jquery基本选择器 层次选择器 过滤选择器 表单选择器使用示例 带注释
- Jquery基本选择器 层次选择器 过滤选择器 表单选择器使用示例 带注释
- Jquery基本选择器 层次选择器 过滤选择器 表单选择器使用示例 带注释
- 使用jQuery属性过滤选择器选择元素
- jquery内容过滤选择器、属性过滤选择器和jquery可见度过滤选择器
- Jquery选择器之可见性选择器、属性过滤选择器
- 【代码片段】jQuery测试属性过滤选择器
- jQuery基本过滤选择器使用介绍
- jQuery属性过滤选择器
- Jquery内容、可见度、属性过滤选择器的理解和简单语句说明
- [轉]jQuery选择器 – 属性过滤(Attribute Filters)
- 使用jQuery内容过滤选择器选择元素实例讲解
- jquery属性过滤选择器
- jQuery基础教程之强大的选择器(过滤选择器-表单对象属性过滤选择器)
- 【11】jQuery学习——入门jQuery选择器之过滤选择器-表单对象属性过滤选择器
- jQuery过滤选择器-属性过滤选择器
- jquery表单对象属性过滤选择器