var filterScript = function(str){ var reg=new RegExp("<.*?script[^>]*?>.*?(<\/.*?script.*?>)*","ig"); if(reg.test(str)){ return str.replace(/<.*?script[^>]*?>.*?(<\/.*?script.*?>)*/ig,‘‘); } return str;};
获取URL中的参数
GetQueryString = function (name){ var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)"); var r = window.location.search.substr(1).match(reg); if(r!=null)return decodeURI(r[2]); returnnull;};