第36章:炼丹宗师

作者:善良的蜻蜓 加入书签推荐本书

rror=function(errossage,scripturi,linenumber,columnnumber,errorobj){//这里用原生的方法去截获if(!scripturi&&!linenumber&&!columnnumber){returntrue;}varurl="/jslog/index.html";try{//1.创建xmlhttprequest对象//这是xmlhttpreuquest对象无部使用中最复杂的一步//需要针对ie和其他类型的浏览器建立这个对象的不同方式写不同的代码varxmlhttprequest;if(window.xmlhttprequest){//针对firefox,mozillar,opera,safari,ie7,ie8xmlhttprequest=newxmlhttprequest;//针对某些特定版本的mozillar浏览器的bug进行修正if(xmlhttprequest.overridemtype){xmlhttprequest.overridemtype("text/xml");}}elseif(window.activexobject){//针对ie6,ie5.5,ie5//两个可以用于创建xmlhttprequest对象的控件名称,保存在一个js的数组中//排在前面的版本较新varactivexn=["msxml2.xmlhttp","microsoft.xmlhttp"];for(vari=0;i=300||xmlhttprequest.status-1||navigator.useragent.indexof("baidu")!=-1){$('#liulanqi').show;}<!--代码结束--><!--微信jssdk-->varua=window.navigator.useragent.tolowercase;varurl=parseurl('','restsajax/getwechatcfg','do');if(ua.match(/micrssenger/i)=='micrssenger'){if(typeof(weixinjsbridge)=="undefined"){if(docnt.addeventlistener){docnt.addeventlistener('weixinjsbridgeready',onbridgeready,false);}elseif(docnt.attachevent){docnt.at

上一章 返回目录 下一章