演示--Jquery核心选择器
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>index</title>
<script type="text/javascript" src="jquery-3.1.1.min.js"> </script>
<script type="text/javascript">
$(function(){
console.log("选择器“*”长度为:"+$("*").length);
console.log("选择器“p”长度为:"+$("p").length);
console.log("选择器“.test”长度为:"+$(".test").length);
console.log("选择器“div.test”长度为:"+$("div.test").length);
console.log("选择器“#test1”长度为:"+$("#test1").length);
}
);
</script>
</head>
<body>
<div>
<p>hello world!</p>
</div>
<div class="test" id="test">
<h3 class="test">hello world!</h3>
<h2 class="test1">hello world!</h2>
</div>
<div class="test1" id="test1">
<h1>hello world!</h1>
</div>
</body>
</html>
页面效果:

演示--Jquery核心选择器的更多相关文章
- 演示-JQuery关系选择器
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...
- 演示-JQuery属性选择器
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...
- jquery 常用选择器和方法以及遍历(超详细)
jQuery 常用选择器和和方法 学习总结 一.JQuery 介绍 1. 什么是 jQuery 2. jQuery 版本介绍 3. jQuery 文件介绍 二.jQuery 对象 1. jQuery ...
- jquery 核心
1.jquery核心函数 1.1 jQuery([selector,[context]]); $("#id"),$(document.body),$(" ...
- jQuery 各种选择器 $.()用法
jQuery 元素选择器jQuery 使用 CSS 选择器来选取 HTML 元素. $("p") 选取 <p> 元素. $("p.intro") 选 ...
- JQuery --- 第一期 (初识jQuery, JQuery核心函数和工具方法)
个人学习笔记 初识jQuery 1.我的第一个JQuery <!DOCTYPE html> <html lang="en"> <head> & ...
- Jq_DOM元素方法跟JQuery 核心函数跟JQuery 事件方法
JQuery DOM 元素 函数 描述 .get() 从队列中删除所有未运行的项目. .ind ...
- 13.11.20 jquery 核心 siblings() 获得同类(不包含自己)循环所有,
jquery 核心1.选择器,2. 创建dom 元素 3. jquery 执行时 4. 延迟执行 5. 循环 6. 计算长度.7.8 获得选择器和所在节点 9. 获得下标 10. 元素存放数据 11 ...
- 前端开发之jQuery篇--选择器
主要内容: 1.jQuery简介 2.jQuery文件的引入 3.jQuery选择器 4.jQuery对象与DOM对象的转换 一.jQuery简介 1.介绍 jQuery是一个JavaScript库: ...
随机推荐
- POJ 2553 The Bottom of Graph 强连通图题解
Description We will use the following (standard) definitions from graph theory. Let V be a nonempty ...
- Spring监管下的Hibernate配置文件
今天看了看别人的程序,用的是SSH搭建的,自己回忆了下感觉假设採用注解的话那么Hibernate的配置文件hibernate.cfg.xml是还须要的,而*.hbm.xml则能够被注解所替代的,结果确 ...
- datagridview导出到excel
Microsoft.Office.Interop.Excel.Range range = null; string saveFileName = ""; bool fileSave ...
- 抽取、转换和装载介绍(七)管理ETL环境(待续)
数据仓库的目标之一是能够为增强业务功能提供适时的.一致的和可靠的数据. 为了达到上述目标,ETL必须按照下述三条标准不断地加以完善: 可靠性 可用性 易管理性 子系统22--作业调度器 子系统23-- ...
- WARNING: arch/arm/mach-omap2/built-in.o(.text+0x12cdc): Section mismatch in reference from the function mmc0_init() to the (unknown reference) .init.data:(unknown)
解决方法,找到对应的不能使用 __init 字眼的地方,删除他即可. 最后删除 296 static struct omap2_hsmmc_info am335x_mmc[] __initdata = ...
- JavaScript 闭包原理分析
本文转载至 http://www.ruanyifeng.com/blog/2009/08/learning_javascript_closures.html 另一篇很好的资料 http://www.k ...
- 数据库——IN、ANY、SOME 和 ALL 操作符的使用
sql中all,any,some用法 简介: --All:对所有数据都满足条件,整个条件才成立,例如:5大于所有返回的id select * from #A where 5>All(select ...
- 内核定时器timer_list
内核在时钟中断发生后执行检测各个定时器是否到期,到期后的定时器处理函数将作为软中断在底半部执行.实质上,时钟中断处理程序会唤起TIMER_SOFTIRQ软中断,运行当前处理器上到期的所有定时器.lin ...
- linux后台运行jar程序
Linux 运行jar包命令如下: 方式一:java -jar XXX.jar特点:当前ssh窗口被锁定,可按CTRL + C打断程序运行,或直接关闭窗口,程序退出那如何让窗口不锁定? 方式二java ...
- Linux网络故障排查
1.先排查网络配置信息 IP地址->子网掩码->网关->DNS 2.查看到达的网关是否连通 ping IP地址. 3.查看DNS解析是否正常.