内容显示页
 
类别:JavaScript | 浏览(78) | 2008-7-7 16:30:26 | 关闭广告

找出所有img标签的,没有带说明属性alt的标签:

正则:<img(?![^<>]*?alt[^<>]*?>).*?>
例子:<img src="" alt=""> <img src="" >  <img src="" title="">  <img src="" id="">  <img src=""  title="" alt="">


扩展,如果要找没有带title属性的a应该是:

正则:<a(?![^<>]*?title[^<>]*?>).*?>
例子:<a src="" alt=""> <a src="" >  <a src="" title="">  <a src="" id="">  <a src=""  title="" alt="">

 


引用本页地址:http://www.yongfa365.com/item/YiGeBiaoQianLiBuBaoHanMouGeShuXingDeZhengZeBiaoDaShiDeXieFa.html
 
 
相关链接
 
网友评论:
姓名: 记住我
网址:
邮箱:
内容:
验证码:  验证码图片看不清? 换张图试试
 
   
 
 
文章分类
 
   

Power by :柳永法(yongfa365)'Blog | Model by :hibaidu | CSS by:众网友 | 京ICP备07011491号  QQ:64049027  E-mail:64049027qq.com

本空间赞助商:北京中科兴联信息技术有限公司