JQuery - * 选择器
2014-01-20 00:00
197 查看
1. #('*') 选择所有元素。
2. #('div > *')选择所有的div元素
2. #('div > *')选择所有的div元素
<html> <head> <title>jQuery universal example</title> <script type="text/javascript" src="jquery-1.9.1.js"></script> <style type="text/css"> div{ padding:8px; } </style> </head> <body> <h1>jQuery universal example</h1> <div class="div-class1"> This is div-class1 <div class="div-class2"> This is div-class1 </div> <div class="div-class3"> This is div-class3 </div> </div> <br/><br/> <button>*</button> <button>div > *</button> <button id="refresh">Refresh</button> <script type="text/javascript"> $("button").click(function () { var str = $(this).text(); $(str).css("border", "1px solid #ff0000"); }); $('#refresh').click(function() { location.reload(); }); </script> </body> </html>
相关文章推荐
- jquery Bug:当表单中包含name为nodeType的input时jquery选择器失效的bug
- jQuery 选择器
- jQuery选择器的奥妙
- jQuery教程06-基本筛选选择器
- jquery框架--jQuery 选择器
- JQuery 选择器
- jQuery过滤选择器
- jQuery中:hidden选择器用法实例
- jQuery基本选择器
- jquery表单对象属性过滤选择器实例分析
- 【三】jquery之选择器
- jQuery选择器
- Jquery选择器 选择一个不存在的元素 为什么不会返回 false
- JQuery 选择器
- 读jQuery之三(构建选择器)
- jQuery选择器代码详解(二)——select方法
- 【前端学习】【jQuery选择器】
- jQuery选择器代码详解(三)——tokenize方法
- JQuery 用法 函数 选择器
- jquery 选择器大全的详细说明和实例