1.截取一个url中是否包含一段字符串:
index = window.location.href.indexOf("固定的字符串"),如果index的值大于-1,则表示该字符串存在,索引的开始值为index的值