首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > Web前端 >

jquery选择器的模糊不清匹配

2012-08-29 
jquery选择器的模糊匹配[attribute^value]匹配给定的属性是以某些值开始的元素!DOCTYPE html PUBLIC -/

jquery选择器的模糊匹配
[attribute^=value]
匹配给定的属性是以某些值开始的元素

<!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>无标题文档</title><script type="text/javascript" src="jquery.js"></script><script type="text/javascript">   $(function(){       alert($("div[id^='T_']").length);    });</script></head><body><div id="T_01"></div><div id="L_02"></div><div id="T_03"></div><div id="T_04"></div></body></html>

热点排行