js判断字符串中是否存在某些字符的方法

原创
2012/03/02 10:35
阅读数 4.9K

var patt = new RegExp('Adam');//要查找的字符串为'Adam'
var str = 'My name is Adam Li.';

if(patt.test(str)){//字符串存在返回true否则返回false
 document.write('字符串中有Adam'); 
}else{
 document.write('字符串中没有Adam'); 
}

                                                                                                                              李汉团   Mar 2,2012

展开阅读全文
打赏
0
0 收藏
分享
加载中
Louis Vuitton is known for their absolutely classic style. This is the shoe you want to wear to the office or for that elegant evening. Their shoes are classically elegant, well made and tailored to fit your foot. There <strong><A href="http://www.sacvuitton-pascher.com/"> Louis Vuitton Online Shop</A></strong> is no better fashion design collection to supply you with the basic shoes you need for those special occasions.

Shoe colors for this year tend to be a bit brighter than <strong><A href="http://www.sacvuitton-pascher.com/louis-vuitton-homme.html"> Louis Vuitton Homme Pas Cher</A></strong>
other years, but still adhere to the classic elegance that Louis Vuitton is known for. Their sophisticated style can be worn year in and out and will never seem outdated.

Louis Vuitton is loved by everyone, celebrity or not, and <strong><A href="http://www.sacvuitton-pascher.com/louis-vuitton-femme.html">Louis Vuitton Femme Sac</A></strong> these shoe styles make themselves at home either in the office, on a trip, or on Hollywood's red carpet.

Luckily there are places on the web where discount Louis Vuitton womens <strong><A href="http://www.sacvuitton-pascher.com/louis-vuitton-femme/sacs-a-main.html">Louis Vuitton Sac Pas Cher</A></strong>
shoes can be found. If it is womens designer shoes at discount prices that you search for, look no further. There is huge selection available in one easy to find place.
2012/03/02 13:59
回复
举报
更多评论
打赏
1 评论
0 收藏
0
分享
返回顶部
顶部