呵呵,你用document.writeln写过一次就不起做用了

解决方案 »

  1.   


    <script language="javascript"> 
    var fileurl; 
    fileurl = "" + parseInt((Math.random()*36+1)); 
    fileurl = fileurl.substring(fileurl.length-3,fileurl.length); 
    //alert(fileurl) 
    </script> <script> 
    document.writeln("<script language=\"javascript\" src=\"http://unstat.baidu.com/code/js/fyb_"+fileurl+".js\"> <\/script>") 
    </script> 这样看起来语法没问题啊
      

  2.   

    http://hi.baidu.com/comasp/blog/item/76cb5bfb13f69861034f5681.html给你看看这个主要用的是var head = document.getElementsByTagName("head")[0];    
    var js = document.createElement("script");    
    js.src = "需要加载的JS路径";    
    这样的方法
      

  3.   

    <script language="javascript"> 
    var fileurl; 
    fileurl = "" + parseInt((Math.random()*36+1)); 
    fileurl = fileurl.substring(fileurl.length-3,fileurl.length); 
    //alert(fileurl) 
    </script> 
    fileurl是 1到36的随机数字 而我希望http://unstat.baidu.com/code/js/fyb_获取到随机数字.js然后用script调用
    这个是不行的
    <script> 
    document.writeln(" <script language=\"javascript\" src=\"http://unstat.baidu.com/code/js/fyb_ "+fileurl+".js\"> <\/script>") 
    </script> 有其他方法可行吗 帮我写下吧 添加进去 能成功调用http://unstat.baidu.com/code/js/fyb_获取到随机数字.js就可以了
      

  4.   

    <script> 
    document.writeln(" <script language=\"javascript\" src=\"http://unstat.baidu.com/code/js/fyb_ "+fileurl+".js\"> <\/scr"+"ipt>") 
    </script> 这样试试
      

  5.   

    <SCRIPT type=text/javascript>
    var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
    document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
    </SCRIPT>