<html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>testPage</title> <script type="text/javascript"> //your js code </script> </head> <body> <form id="form1" runat="server"> <div> </div> </form> </body> </html>1.2界面上的body部分
<html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>testPage</title> </head> <body> <form id="form1" runat="server"> <div> </div> </form> <script type="text/javascript"> //your js code </script> </body> </html>放在head和body中没有什么区别,一般代码量不多的时候,而且只有当前页面使用这些js,那就直接写在界面上吧。

要在MyJSFrm.aspx中使用这个js文件就这样引入。
<html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>testPage</title> </head> <body> <form id="form1" runat="server"> <div> </div> </form> <script type="text/javascript" src="/Scripts/jquery-1.4.1.js"></script> <script type="text/javascript"> //your js code </script> </body> </html>总之,别忘了使用相对目录,如果当前页面文件的目录层级比较深,那就使用../自己算目录的层级吧。