//获取urlvar url = window.location.search;//判断url中是否包含ajlb字串if (url.indexOf("ajlb") != -1){}else{//截取url路径中自己所需要的字串var params1 = url.substring((url.lastIndexOf("slsjMoney")+10),(url.lastIndexOf("searchName")-1));if (params1 == null){}else {queryTimeMonth = params1;}//因为有时候从url截取的中文字串会成为乱码,所以需要使用decodeURI把他转换为中文。var search1 = decodeURI(url.substring((url.lastIndexOf("searchName")+11),(url.lastIndexOf("dwdm")-1)));}
1200字范文,内容丰富有趣,写作的好帮手!