首页 Javascript 正文
  • 本文约635字,阅读需3分钟
  • 3561
  • 0
举报该广告
js中document.write()用法

js中document.write()用法

<script>
             var hrf = window.location.href;

    if(hrf.indexOf('change')>0){
      document.write('<body>');
               document.write('恭喜发财');
      document.write('</body>');
    }else{
    document.write('<body background="images/jjkan/backgroundm.jpg" >');
       document.write('<label id="lmxj_deatil_1" style="position:absolute;left:10px;top:20px;text-align:left;background-color:#00000;color:#010101;width:330px;font-size:18px;" value="1111" disabled>');
       if(isAdv==0){
      if(entityType=="channel"){       
      var sId = viewContent;
    //  target.innerHTML = '<AV id="movieWnd" serviceID="'+sId+'" name="movieWnd" style="position:absolute; border-width:0; left:5px; top:70px; //width:328px; height:244px;visibility: hidden;">';
     document.write('<AV id="movieWnd" serviceID="'+sId+'" name="movieWnd" style="position:absolute; border-width:0; left:5px; top:70px; width:328px; height:244px;">');
     movieWnd.play();
      }else{
      document.write('<div id="divNodeDescribeImg" style="position:absolute; border-width:0; left:5px; top:70px; width:328px; height:244px;"><img src = "'+viewContent+'" width="339" height="275" border="0"/></div>');
      //target.innerHTML = '<img src = "'+viewContent+'" width="339" height="275" border="0"/>'; 
      }
    }else{
        //广告调用方式:通过节点的code(由生成页面的时候生成出来),调用广告系统中的js代码方式,返回广告代
      document.write('<div id="tes" style="position:absolute; border-width:0; left:5px; top:70px; width:328px; height:244px;"><input id  = "showrs" type = "text"></input></div>');
      setInterval("timeout()",1000);
    //document.getElementById('aaa').value = "aaa";
    //target.style.visibility ="visible";
    // document.write('<img src = "http://X.X.X.X/images/material/advert_epg.jpg" width="339" height="275" border="0"/>');
    //document.getElementById('aaa').value ="bbb";

    }
           document.write('</body>');
    }

  </script>

📱 扫码关注公众号

公众号二维码

扫描二维码关注我们,获取更多精彩内容
实时更新 · 干货满满

收藏

扫描二维码,在手机上阅读
评论
更换验证码
友情链接