系统学习jQuery.核心知识.局部.jQuery选择器.基本选择器
来源:互联网 发布:apache http服务器 编辑:程序博客网 时间:2024/05/22 17:08
1.基本选择器介绍
基本选择器是jQuery中(共5个)最常用的选择器,也是最简单的选择器,它通过元素的id、class和标签名等查找DOM元素,在CSS都有对应的选择器,所以这里的选择器没有什么难度。
2.详细介绍每个基本选择器
3.实例应用
<html><head><title>基本选择器(共5种)</title><style type="text/css">.person,.country{width:280px;height:280px;border:#000 1px solid;background-color:#aaa;font-family:Verdana;font-size:17px;float:left;margin:5px;}.provinceLevel{width:80px;height:80px;background-color:#f00;font-size:12px;margin-top:12px;}</style><script type="text/javascript" src="jquery.min.js"></script><script type="text/javascript">$(document).ready(function(){$("#Jason").css("background-color","#fff");//id选择器//$(".country").css("background-color","#fff");//类选择器//$("p").css("background-color","#fff");//标签选择器//$("p,#beijing").css("background-color","#fff");//组合选择器//$("*").css("background-color","#fff");});</script></head><body><div id="Jason" class="person">Jason's block.<p>Jason's dream is to go abroad for studying.</p></div><div id="China" class="country">China's block.<p>China's dream is to become the most stronger country.</p><div id="shandong"" class="provinceLevel">ShanDong province's block.</div><div id="beijing" class="provinceLevel">BeiJing city's block</div></div><div id="Spanish" class="country">Spanish's block.</div></body></html>
0 0
- 系统学习jQuery.核心知识.局部.jQuery选择器.基本选择器
- 系统学习jQuery.核心知识.局部.jQuery选择器.层次选择器
- 系统学习jQuery.核心知识.局部.jQuery选择器.jQuery选择器概论与分类
- jQuery选择器 基本选择器
- Jquery选择器-基本选择器
- jquery选择器的基本学习
- jquery学习笔记-基本选择器
- jQuery学习之基本选择器
- JQuery学习笔记-基本选择器
- 一步一步学习 JQuery (二) 选择器: 基本选择器 && 层次选择器
- jQuery学习之基本选择器、层次选择器和并且选择器
- 演示--Jquery核心选择器
- Jquery实战学习--Jquery的基本选择器
- jQuery选择器之基本选择器
- jquery选择器中基本选择器
- jquery选择器中基本选择器
- jQuery选择器-基本选择器示例
- 2.jquery选择器 基本选择器
- 未分类--Windows API--VariantInit
- 算法练习之水题
- 黑马程序员 JAVA 基础篇(二)
- 未分类--Windows API--VariantClear
- 设计模式之观察者模式
- 系统学习jQuery.核心知识.局部.jQuery选择器.基本选择器
- Less资源汇总
- Android系统默认Home应用程序(Launcher)的启动过程源代码分析
- 解决Mac OS X下VirtualBox "Failed to load VMMR0.r0 (VERR_SUPLIB_WORLD_WRITABLE)"错误
- C语言中使用汇编语言之一GCC内嵌汇编
- C++中string类
- O-Kai - This group captures Taiwan's native spirit in an unexpected way(1)
- IOS面试题
- maven 动态web项目jar包冲突