http://www.admin5.com/images/2008a/web.js 这一个js文件。我下载到本地。我放在htm文件里
<html>
<head>
<script src="web.js" type="text/javascript"></script> </head>
<body>
<form id="Form1" method="post" runat="server"> </form>
</body>
<script type="text/javascript">admin5.init()</script>
</html>
运行正常。
如果放在aspx文件里
<%@ Page language="c#" Codebehind="WebForm1.aspx.cs" AutoEventWireup="false" Inherits="wen20.web.BookInfo.WebForm1" %><html>
<head>
<script src="web.js" type="text/javascript"></script> </head>
<body>
<form id="Form1" method="post" runat="server"> </form>
</body>
<script type="text/javascript">admin5.init()</script>
</html>
提示:'admin5'未定义。高手帮帮忙,谢谢!!!
<html>
<head>
<script src="web.js" type="text/javascript"></script> </head>
<body>
<form id="Form1" method="post" runat="server"> </form>
</body>
<script type="text/javascript">admin5.init()</script>
</html>
运行正常。
如果放在aspx文件里
<%@ Page language="c#" Codebehind="WebForm1.aspx.cs" AutoEventWireup="false" Inherits="wen20.web.BookInfo.WebForm1" %><html>
<head>
<script src="web.js" type="text/javascript"></script> </head>
<body>
<form id="Form1" method="post" runat="server"> </form>
</body>
<script type="text/javascript">admin5.init()</script>
</html>
提示:'admin5'未定义。高手帮帮忙,谢谢!!!
=====>
<script src="~/web.js" type="text/javascript"> </script>
你看你的HTML form怎么会是runat server呢?
把这个东西去掉试试。
可能是标准的问题。
放在HTML后面看看
去掉
如果用了AJAX可能是会有莫名奇妙的出错!!
要改成asic码,不然有汉字就报错