probably the format is wrong, do you have <script ..> .. </script> in your js file? if yes, remove those tags!

解决方案 »

  1.   

    it should be:
    <meta name="vs_targetSchema" ontent="http://schemas.microsoft.com/intellisense/ie5">
    <!--#include file="your virtual path"-->
    in the top of "html".
      

  2.   

    index.aspx:
    <html>
    <head>
    <script language="javascript" src="jsfile.js"></script>
    </head>
    <body onload="init();">
    </body>
    </html>
    jsfile.js:
    function init()
    {
      alert("init");
    }
    就是在这种情况下,我的index.aspx文件不包含jsfile.js,不然页面打开会弹出一个警告窗口的。
    不知道我的代码有没有问题,请高手帮忙修改一下~
      

  3.   

    我也遇到这样的问题。...妈的,一直找不到解决方法,js文件格式,没有错误!!
    因为我把页面改为.htm就可以正常执行包含在 js文件中的 函数.但一改成aspx就不行了。.郁闷啊
      

  4.   

    我在很多aspx页中都用楼主那样的方法引入js文件,从没有什么问题,试试在你的web.config中加入如下配置节看看如何:<globalization fileEncoding="gb2312" responseEncoding="gb2312" requestEncoding="gb2312" culture="zh-cn" uiCulture="zh-cn"/>
      

  5.   

    因为我把你贴出来的代码拷贝到记事本里面然后另存为.aspx和js文件,
    一样能弹出对话框