jquery选择器中基本选择器
来源:互联网 发布:淘宝上的缩阴棒放心吗 编辑:程序博客网 时间:2024/06/11 17:01
基本选择器中的各个小类:
1、id选择器
根据给定的id匹配个元素
2、class选择器
根据给定的类名匹配元素
3、element选择器
根据给定的元素名匹配元素
4、 * 选择器
匹配所有元素
5、并列选择器
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> //请自己引用js文件 <title>New Web Project</title> <script type="text/javascript" src="jquery-1.8.0.js"></script> <script type="text/javascript"> $(function(){ $('#bt1').click(function(){ alert('id选择器:'+$('#d1').html() + "\nclass选择器:"+$('.c1').html() +"\n元素选择器:"+$('p').eq(0).html() +"\n*选择器:"+$('*').eq(5).html() +"\n多选择器选中的个数:"+$('div,p,#bt1').length ); }); }); </script> </head> <body> <div id="d1">我是一个div</div> <div class="c1">我是一个div2</div> <p>我是一个p</p> <input type="button" value="button" id="bt1" /> </body> </html>
- jquery选择器中基本选择器
- jquery选择器中基本选择器
- JQuery中基本选择器
- jQuery选择器 基本选择器
- Jquery选择器-基本选择器
- jQuery选择器之基本选择器
- jQuery选择器-基本选择器示例
- 2.jquery选择器 基本选择器
- Jquery选择器的基本选择器
- JQuery选择器(一) 基本选择器
- jQuery基本选择器、层次选择器
- jquery选择器之基本选择器
- jQuery选择器详细介绍:基本选择器,层次选择器,属性选择器
- jQuery中常用基本选择器的使用方法
- jQuery基本选择器
- jQuery基本选择器
- JQuery基本选择器
- jQuery基本选择器
- 在spring中通过hibernate配置C3P0
- xml的添加
- shope实例
- Spring MVC 框架搭建及详解
- python学习:函数参数的packing和unpacking传递
- jquery选择器中基本选择器
- Android产品设计规范
- “黑暗面程序员”IO流FileWrite例子
- Accelerated C++ Exercise 5-9
- Prewitt算子
- android 设置边框圆角
- 8051中断控制寄存器
- 巨头夹缝求生存:菜鸟创业团队的辛酸苦辣 (本文转载)
- NIO工作原理