Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

c#Öе÷ÓÃJavaScript½Å±¾º¯ÊýµÄÒ»ÖÖ·½·¨

ÀûÓà           Page.RegisterStartupScript("", "<script language='javascript'> results();</script>");    
      »òÕßÊÇ         Page.RegisterClientScriptBlock("", "<script language='javascript'> results();</script>");    
ÆäÖеÚÒ»¸ö²ÎÊýÊÇÖ¸ËùÓõĹؼü×Ö£¬Ò»°ãΪpage.ClientScriptÀàÐ͵Ä×Ö·û´®£»results£¨£©º¯ÊýÊÇÔÚǰ¶Ë¶¨ÒåµÄJavaScript½Å±¾¹¦Äܺ¯ÊýÃû¡£
µ«ÊÇÀûÓÃpageÕâÒ»À࣬»á³öÏÖpage¹ýʱµÄ¾¯¸æ´íÎóÈçÏ£º
“System.Web.UI.Page.IsClientScriptBlockRegistered(string)”Òѹýʱ:“The recommended alternative is ClientScript.IsClientScriptBlockRegistered(string key). http://go.microsoft.com/fwlink/?linkid=14202”
½â¾öµÄ°ì·¨ÊÇÀûÓÃpage.clientScriptµÄRegisterStartupScript»òÕßÊÇRegisterClientScriptBlock·½·¨£¬Á½Õß¹¦ÄÜÊÇÒ»ÑùµÄ£¬¾ßÌåÈçÏ£º
protected void Button2_Click(object sender, EventArgs e)
    {
        ClientScriptManager csm = Page.ClientScript;
        string scriptName = "ClientScript";
        if (!csm.IsClientScriptBlockRegistered(scriptName))
        {
          //  csm.RegisterStartupScript(this.GetType(),scriptName , "<script language='javascript'> results();</script>");
            csm.RegisterClientScriptBlock(this.GetType(), scriptName, "<script language='javascript'> results();</script>");
        }
    }


Ïà¹ØÎĵµ£º

javascriptѧϰ×ܽá

1.JavaScriptÖеĶÔÏó
·ÖΪ3ÖÖ¡£
£¨1£©JavaScriptµÄÄÚÖöÔÏó
³£ÓõÄÓÐDate,Array,String,Math,¶ÔÏó,ÕâЩ¶¼ÊǾ­³£»áÓõ½µÄ£¬Ò»¶¨ÒªÕÆÎպá£
£¨2£©Îĵµ¶ÔÏóÄ£ÐÍ(Document Object Model,DOM)
Õâ¸ö¶ÔÏó±íʾÁ˵±Ç°ä¯ÀÀÆ÷µÄ¶à¸ö×é¼þºÍµ±Ç°µÄHTMLÎĵµ¡£DOMÎÒÈÏΪÊÇJSÖÐ×îÖØÒªµÄÒ»¸ö¶ÔÏó£¬Í¨¹ýËû¿ÉÒÔ»ñµÃÈκÎÒ»¸öHTMLÔªËØ ......

javascript »º´æÏµÍ³

Ä£·ÂjQuery£¬Éè¼ÆÁËÒ»¸ö»º´æÏµÍ³¡£ÏñjQuery.dataÕâÑùµÄ¶«Î÷£¬PrototypeÓëmootoolsÒ²ÓУ¬Ä¿µÄ¶¼ÊÇÓÃÀ´¸¨Öúʼþϵͳ£¬ÓÃÀ´»º´æÆäÖÐÉú³ÉµÄÊý¾Ý£¬¶ø·Ç»º´æÆÕͨº¯ÊýÉϴμÆËãµÄ½á¹û¡£PrototypeÀûÓÃÁËËüµÄHashÀ࣬mootoolsûϸ¿´£¬ËüÄÚ²¿ºÃÏñÓÃÀ´»º´æuuid¡£Ò»¸ö¹²Ê¶ÊÇ£¬ÎªÒ³ÃæÓõ½µÄÔªËØÉèÖÃuuid·Ç³£ÓÐÓã¬Òª²éÕÒÔªËØÊ±£¬¿ÉÒÔ±ÜÃâÖ ......

JavaScriptÌØÐ§£ºµ¯³ö²Ëµ¥

<!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;&n ......

JavaScriptÌØÐ§£ºÍ¼Æ¬Êó±ê¹öÂÖËõ·Å

<!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>
<title>ͼƬÊó±ê¹öÂÖËõ·Å</title>
<meta http-eq ......

JavaScriptÌØÐ§£ººáÏò²»¼ä¶Ï¹ö¶¯

<!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>
<title>ºáÏò²»¼ä¶Ï¹ö¶¯Í¼Æ¬</title>
<meta http- ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ