<!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("选择器“p[align]”长度为:"+$("p[align]").length);
console.log("选择器“p[align='center']”长度为:"+$("p[align='center']").length);
console.log("选择器“p[title='hellohtmlworld']t”长度为:"+$("p[title='hellohtmlworld']").length);
console.log("选择器“p[title^='hello ']”长度为:"+$("p[title^='hello ']").length);
console.log("选择器“p[title$='world']”长度为:"+$("p[title$='world']").length);
console.log("选择器“p[title*='html']”长度为:"+$("p[title*='html']").length);
console.log("选择器“p[title~='hello']”长度为:"+$("p[title~='hello']").length);
console.log("选择器“p[title|='hello']”长度为:"+$("p[title|='hello']").length);
console.log("选择器[href^='http'][title='hello-html-world']”长度为:"+$("[href^='http'][title='hello-html-world']").length);
}
);
</script>
</head>
<body>
<div>
<p align="center">hello world!</p>
<p align="">hello world!</p>
</div>
<div class="test" id="test" align="" style="background-color:#CCCCCC">
<p class="test" title="hello">hello world!</p>
<p class="test" title="hello html world">hello world!</p>
<p class="test1" title="hellohtmlworld">hello world!</p>
<p class="test1" title="hello-html-world">hello world!</p>
<a class="test1" title="hello-html-world" href="http://www.cnblogs.com/yw0219/p/5928955.html">JQuery选择器</a>
</div>
</body>
</html>

结果:

最新文章

  1. Ubuntu配置svn
  2. LoadRunner监控Linux
  3. 20135335郝爽 &amp; 20135304刘世鹏 实验一
  4. ArcGISDynamicMapServiceLayer 实现条件过滤
  5. cxGrid使用汇总1
  6. 支付宝开通海外退税 阿里腾讯暗战跨境O2O_21世纪网
  7. C#图像处理(4):图像的剪裁
  8. js原生forEach、map与jquery的each、$.each的区别
  9. Go语言的切片
  10. [PKUWC2019]Day1 T2 你和虚树的故事
  11. (其他)sublime text3的emmt插件的简便用法
  12. 修改mysql 数据库编码
  13. 蛋白序列GO号注释及问题
  14. 几句话说说跨IDC分布式数据库Calvin
  15. grep用法详解:grep与正则表达式
  16. LaTeX之参考文献的写法
  17. 3.Dynamic Layout 动态布局。在槽中处理布局
  18. [译文]Casperjs1.1.0参考文档-安装
  19. NBUT 1107——盒子游戏——————【博弈类】
  20. error:control reaches end of non-void function [-Werror=return-type]

热门文章

  1. MarkDown的vim插件安装
  2. git使用(二)----创建版本库
  3. 以太网基础知识0(UDP和TCP有什么区别)
  4. (基于Jenkins + SVN + Ant + Weblogic Server的)应用程序自动(/一键)部署的设想
  5. java.util.logging.Logger日志生成过程浅析 (转)
  6. 【转】Hive SQL的编译过程
  7. less css框架的学习
  8. 查看JSTL的doc解决问题
  9. LeetCode: Min Stack 解题报告
  10. #include&lt;algorithm&gt;里的函数