JS内部调用JS文件:document.write("<script src='mm.js'></scr" + "ipt>");  //注意一定要将</script>劈开

解决方案 »

  1.   

    document.write("<scri" + "pt src='/inc/datetitle.js'></scri" + "pt>");
    我是这样写的.
    写在了一个table里,但是它不是在原来的位置显示时间,面是折行到下一行里去显示.
    为什么呢.
      

  2.   

    head.js的源代码如下://网页标题部分head.js//document.write('<center>');
    document.write('<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="778" id="AutoNumber1">');
    document.write('<tr><td width="100%" bgcolor="#000000" height="5" colspan="2"></td></tr>');
    document.write('<tr><td width="100%" colspan="2">');
    //修改相应的flash文件名
    document.write('<embed width="778" height="80" src="/economy/images/title_economy.swf">');
    document.write('</td></tr>');
    document.write('<tr><td width="100%" bgcolor="#DA3A3F" height="2" colspan="2"></td></tr>');
    document.write('<tr><td width="600" bgcolor="#A10106" height="21" >');
    document.write('<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" id="AutoNumber3" width="553">');
    document.write('<tr><td width="12%" align="center"><a href="/index.jsp">');
    document.write('<img border="0" src="../images/m-01.gif" width="75" height="21" ></a></td>');
    document.write('<td width="12%" align="center"><a href="/general/index.html"><img border="0" src="../images/m-02.gif" width="75" height="21"></a></td>');
    document.write('<td width="12%" align="center"><a href="/govaffair/index.jsp"><img border="0" src="../images/m-03.gif" width="75" height="21" ></a></td>');
    document.write('<td width="12%" align="center"><a href="/economy/index.jsp"><img border="0" src="../images/m-04.gif" width="75" height="21"></a></td>');
    document.write('<td width="13%" align="center"><a href="/society/index.jsp"><img border="0" src="../images/m-05.gif" width="75" height="21"></a></td>');
    document.write('<td width="13%" align="center"><a href="/science/index.jsp"><img border="0" src="../images/m-06.gif" width="75" height="21"></a></td>');
    document.write('<td width="13%" align="center"><a href="/govwork/index.jsp"><img border="0" src="../images/m-07.gif" width="75" height="21"></a></td>');
    document.write('</tr></table></td>');
    document.write('<td width="178" bgcolor="#A10106" height="21">');
    //显示时间
    document.write("<scri" + "pt src='/inc/datetitle.js'></scri" + "pt>");
    //document.write('<table width="170" height="21" border="0"><tr><td>');
    //document.write('<div style="top:150px;left:500px">');
    //document.write('<script src="/inc/datetitle.js"></script>');
    //document.write('</div>');
    //document.write('</td></tr></table>');document.write('</td></tr>');
    document.write('<tr><td width="100%" bgcolor="#DCDCDC" height="3"  colspan="2"></td></tr>');
    document.write('</table>');
    //document.write('</center>');
      

  3.   

    JS只能放在*.asp 里 不能放在*.htm里
      

  4.   

    //document.write('<script src="/inc/datetitle.js"></script>'); //加了//也不行
    ==>
    //document.write('<script src="/inc/datetitle.js"></scr'+'ipt>');
      

  5.   

    晕,//能注释掉</script>吗?那是脚本结束的标志,乖乖,听梅MM的没错
      

  6.   

    但它能注释掉document呀.
    高手,请说清楚一些,
    小弟多谢了.