现在的位置: 首页 > 综合 > 正文

js中document.write()用法

2012年10月03日 ⁄ 综合 ⁄ 共 1794字 ⁄ 字号 评论关闭

 <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://192.168.18.146/images/material/advert_epg.jpg" width="339" height="275" border="0"/>');
    //document.getElementById('aaa').value ="bbb";

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

抱歉!评论已关闭.