ShowAspxJavaScript.htm
jstest.aspx
<
html
>
< head >
< title > html页面如何通过js加载后台信息 </ title >
</ head >
< body >
< br />
< hr />
< script type ="text/javascript" src ="jstest.aspx" ></ script >
</ body >
</ html >
< head >
< title > html页面如何通过js加载后台信息 </ title >
</ head >
< body >
< br />
< hr />
< script type ="text/javascript" src ="jstest.aspx" ></ script >
</ body >
</ html >
jstest.aspx
<%
@ Page Language
=
"
C#
"
%>
< script runat = " server " >
protected void Page_Load( object sender, EventArgs e)
... {
Common.MyJavaScript.Head();
Common.MyJavaScript.Write("function out(){");
Common.MyJavaScript.DocumentWrite("世界你好");
Common.MyJavaScript.Write("}");
Common.MyJavaScript.Write("out();");
Common.MyJavaScript.End();
}
</ script >
< script runat = " server " >
protected void Page_Load( object sender, EventArgs e)
... {
Common.MyJavaScript.Head();
Common.MyJavaScript.Write("function out(){");
Common.MyJavaScript.DocumentWrite("世界你好");
Common.MyJavaScript.Write("}");
Common.MyJavaScript.Write("out();");
Common.MyJavaScript.End();
}
</ script >