javascriptµ÷ÓÃasp.netºǫ́µÄ¼¸ÖÖ·½·¨
1. javaScriptº¯ÊýÖÐÖ´ÐÐC#´úÂëÖеĺ¯Êý£º
·½·¨Ò»£º1¡¢Ê×ÏȽ¨Á¢Ò»¸ö°´Å¥£¬ÔÚºǫ́½«µ÷Óûò´¦ÀíµÄÄÚÈÝдÈëbutton_clickÖÐ;
2¡¢ÔÚǰ̨дһ¸öjsº¯Êý£¬ÄÚÈÝΪdocument.getElementById("btn1").click();
3¡¢ÔÚǰ̨»òºǫ́µ÷ÓÃjsº¯Êý£¬¼¤·¢clickʼþ£¬µÈÓÚ·ÃÎʺǫ́c#º¯Êý£»
·½·¨¶þ£º1¡¢º¯ÊýÉùÃ÷Ϊpublic
ºǫ́´úÂë(°Ñpublic¸Ä³ÉprotectedÒ²¿ÉÒÔ)
public string ss()
{
return("a");
}
2¡¢ÔÚhtmlÀïÓÃ <%=fucntion()%>¿ÉÒÔµ÷ÓÃ
ǰ̨½Å±¾
<script language=javascript>
var a = " <%=ss()%>";
alert(a);
</script>
·½·¨Èý£º1¡¢ <script language="javascript">
<!--
function __doPostBack(eventTarget, eventArgument)
{
var theForm = document.Form1; //Ö¸runat=serverµÄform
theForm.__EVENTTARGET.value = eventTarget;
thefrom.__EVENTARGUMENT.value = eventArgument;
theForm.submit();
}
-->
</script>
<input type="button" value="°´Å¥" >
·½·¨ËÄ£º <script language="javascript">
function SubmitKeyClick()
{
if (event.keyCode == 13)
{
Ïà¹ØÎĵµ£º
ÏÈ¿´¿´ASP.NETÒ³ÃæË¢ÐµÄʵÏÖ·½·¨£º
µÚÒ»£º
private void Button1_Click( object sender, System.EventArgs e ) { Response.Redirect( Request.Url.ToString( ) ); }
µÚ¶þ£º
private void Button2_Click( object sender, System.EventArgs e ) { Response.Write( " < script language=javascript>window.locat ......
Ò»¡¢Response¶ÔÏó
Response¶ÔÏóÊÇHttpResponseÀàµÄÒ»¸öʵÀý¡£¸ÃÀàÖ÷ÒªÊÇ·â×°À´×ÔASP.NET²Ù×÷µÄHTTPÏìÓ¦ÐÅÏ¢¡£
1.Response¶ÔÏóµÄÊôÐÔ
¢Ù BufferOutput
˵Ã÷£º»ñÈ¡»òÉèÖÃÒ»¸öÖµ£¬¸ÃֵָʾÊÇ·ñ»º³åÊä³ö£¬²¢ÔÚÍê³É´¦ÀíÕû¸öÒ³Ö®ºó½«Æä·¢ËÍ
ÊôÐÔÖµ£ºÈç¹û»º³åÁ˵½¿Í»§¶ËµÄÊä³ö£¬ ......
JavaScript TableÅÅÐò
Ðò¶þ£¨09/05/03£©
½üÀ´»¹ÊÇÄÇô棬³ÃÎåÒ»¸üÐÂһϳÌÐò°É¡£
Õâ¸ö°æ±¾Ö÷ÒªÔö¼ÓºÍ¸Ä½øÁËÒÔ϶«Î÷£º
1£¬¶Ô×Ö·û´®¸ÄÓÃlocaleCompareÀ´±È½Ï£»
2£¬Ò»´ÎÅÅÐòÖÐÄÜʹÓöà¸öÅÅÐò¶ÔÏó£¨ÓÃÓÚÖµÏàµÈʱÔÙÅÅÐò£©£»
3£¬ÐÞÕýһЩ·¢ÏÖµÄÎÊÌ⣻
4£¬¸Ä½ø³ÌÐò½á¹¹£¬¸öÈ˾õµÃÊǸüÁé»î¸ü·½±ãÁË£»
5£¬Ôö¼ÓboolÀàÐÍ±È ......
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<title>ÍøÒ³¼ÆËãÆ ......