ÈçºÎΪjavascript´úÂë±àдעÊÍÒÔÖ§³ÖÖÇÄܸÐÖª
¡¾×ª¡¿http://www.cnblogs.com/chenxizhang/archive/2009/07/12/1522058.html
ÔÚʹÓÃVisual Studio×ö¿ª·¢µÄʱºò£¬ÖÇÄܸÐÖªÊǷdz£·½±ãµÄ¡£´ÓVS2008¿ªÊ¼£¬ÌṩÁ˶ÔjavascriptµÄÖÇÄܸÐÖªÖ§³Ö¡£ÀýÈç
ÉÏÊö´úÂëÖУ¬ÎÒÃÇÏÈÓÃdocument¶ÔÏóµÄgetElementByIdµÄ·½Ê½È¡µÃÁËÎĵµÖеÄÒ»¸öIdΪform1µÄÔªËØ£¬Êµ¼ÊÉϾÍÊÇĬÈϵÄÄǸö´°ÌåÔªËØ¡£È»ºó£¬ÎÒÃǽ«Æ丳¸øÒ»¸öÃûΪfµÄ±äÁ¿¡£
È»ºó£¬ÎÒÃÇÔÚʹÓÃf Õâ¸ö±äÁ¿µÄʱºò£¬¾ÍÄÜ×Ô¶¯µØÁгö¸ÃformÔªËØËùÓ¦¸ÃÓеÄһЩ³ÉÔ±£¬ÀýÈçactionµÈµÈ¡£
ÕâЩÊôÓÚÊÇĬÈϵÄÔªËغͷ½·¨µÄÖÇÄܸÐÖª£¬¼ÙÉèÎÒÃÇ×Ô¼ºÓÐһЩ×Ô¶¨Òåjs´úÂ룬ÈçºÎÈÃËüÒ²Äܹ»ÖÇÄܸÐÖªÄØ£¿
´ð°¸ÊÇ£º¶ÔÓÚ×Ô¶¨Òå·½·¨µÄÖÇÄܸÐÖª£¬ÊÇ×Ô¶¯µÄ¡£
ÀýÈ磬ÎÒÃÇÔÚÒ³ÃæÖÐÌí¼ÓÒ»¸ö·½·¨ÈçÏÂ
function Helloworld(name) {
alert("hello," + name);
}
È»ºóÔÚÎĵµµÄÈκÎÒ»¸ö²¿·Ö£¬ÎÒÃÇÏëµ÷Óø÷½·¨£¬¶¼¿ÉÒÔ×Ô¶¯µØ±»ÖÇÄܸÐ֪ʶ±ðµ½
ÕâÖÖÖÇÄܸÐÖªÓ¦¸ÃÊÇ×î»ù±¾µÄ¡£µ«ÊÇÎÒÃǾ³£ÔÚÓÃc#±àд´úÂëµÄʱºò£¬ÓÐÁíÍâÒ»ÖÖ¸üºÃµÄÖÇÄܸÐÖª£º¾ÍÊÇ˵²»¹âÊÇÁгö·½·¨Ãû£¬¶øÇÒ»áÓжԸ÷½·¨ÒÔ¼°ËüµÄ²ÎÊý£¬·µ»ØÖµµÄÏêϸÃèÊö£¬ÕâÑùʹÓÃÕ߾ͿÉÒÔ¸üºÃµØʹÓø÷½·¨ÁË¡£ÈçÏÂËùʾ
ÕâÊÇÔõôʵÏÖµÄÄØ?ÆäʵÕâÊÇͨ¹ý×¢ÊÍÀ´ÊµÏֵģ¬ÈçÏÂÃæËùʾ
/// <summary>
/// ¸ù¾ÝÒ»¸öÈËÃû·µ»ØÒ»¸öÎʺòÓï
/// </summary>
/// <param name="name">ÒªÎʺòµÄÈË</param>
/// <returns>·µ»ØµÄÎʺòÓï</returns>
public string Helloworld(string name)
{
return "hello," + name;
}
ÕâÖÖ×¢ÊÍÎÒÃdzÆΪXML×¢ÊÍ£¬ÊÇ´Ó.NET 2.0¿ªÊ¼ÌṩµÄÒ»ÖÖй¦ÄÜ¡£
ºÃ£¬Á˽âÁËÉÏÃæµÄ֪ʶºó£¬Èç¹ûÎÒÃÇÐèҪΪÎÒÃǵÄjavascript´úÂëÌí¼ÓÀàËƵÄÖÇÄܸÐÖªÌáʾ£¬ÄÇôÄܲ»ÄÜÒ²ÓÃ×¢ÊÍÄØ£¿
Êǵģ¬ÎÒÃǵÄÈ·¿ÉÒÔÕâô×ö
function SomeMethod(a, b) {
/// <summary>
/// ÕâÊÇÒ»¸ö·½·¨
/// </summary>
/// <param name="a">ÕâÊDzÎÊýa</param>
/// <param name="b">ÕâÊDzÎÊýb</param>
/// <returns>·½·¨µÄ·µ»ØÖµ</returns>
return "Hello,worod";
}
ÓÐÒ»µã²»Í¬µÄÊÇ£¬ÕâЩעÊÍÊÇдÔÚ·½·¨ÄÚ²¿µÄ£¬¶ø²»ÏñC#ÄÇÑùдÔÚ·½·¨Íⲿ¡£¶øÇÒ£¬Èç¹ûҪʵÏÖÕâÑùµÄ¹¦ÄÜ£¬ÒÔ
Ïà¹ØÎĵµ£º
1.document.write(""); Êä³öÓï¾ä
2.JSÖеÄ×¢ÊÍΪ//
3.´«Í³µÄHTMLÎĵµË³ÐòÊÇ:document->html->(head,body)
4.Ò»¸öä¯ÀÀÆ÷´°¿ÚÖеÄDOM˳ÐòÊÇ:window->(navigator,screen,history,location,document)
5.µÃµ½±íµ¥ÖÐÔªËصÄÃû³ÆºÍÖµ:document.getElementById("±íµ¥ÖÐÔªËصÄIDºÅ").name(»òvalue)
6.Ò»¸öСдת´ó ......
ÓÃJavascriptÈ¡floatÐÍСÊýµãºóÁ½Î»£¬Àý22.127456È¡³É22.13,ÈçºÎ×ö£¿
1. ×µÄ°ì·¨....... [ÎÒ¾ÍÔõô¸ÉµÄ.........]
1function get()
2{
3 var s = 22.127456 + "";
4 var str = s.substring(0,s.indexOf(".") + ......
±Õ°ü£¨closure£©ÊÇJavascriptÓïÑÔµÄÒ»¸öÄѵ㣬ҲÊÇËüµÄÌØÉ«£¬ºÜ¶à¸ß¼¶Ó¦Óö¼ÒªÒÀ¿¿±Õ°üʵÏÖ¡£
ÏÂÃæ¾ÍÊÇÎÒµÄѧϰ±Ê¼Ç£¬¶ÔÓÚJavascript³õѧÕßÓ¦¸ÃÊǺÜÓÐÓõġ£
Ò»¡¢±äÁ¿µÄ×÷ÓÃÓò
ÒªÀí½â±Õ°ü£¬Ê×ÏȱØÐëÀí½âJavascriptÌØÊâµÄ±äÁ¿×÷ÓÃÓò¡£
±äÁ¿µÄ×÷ÓÃÓòÎ޷ǾÍÊÇÁ½ÖÖ£ºÈ«¾Ö±äÁ¿ºÍ¾Ö²¿±äÁ¿¡£
JavascriptÓïÑÔµÄÌØÊâÖ®´¦£¬¾ÍÔÚÓ ......
¡¾×ª¡¿http://www.cnblogs.com/chenxizhang/archive/2010/01/02/1638010.html
±¾ÎÄתÔØ×Ô£ºhttp://www.cn-cuckoo.com/2007/08/01/understand-javascript-closures-72.html
Òª³ÉΪ¸ß¼¶ JavaScript ³ÌÐòÔ±£¬¾Í±ØÐëÀí½â±Õ°ü¡£
±¾ÎĽáºÏ ECMA 262 ¹æ·¶Ïê½âÁ˱հüµÄÄÚ²¿¹¤×÷»úÖÆ£¬Èà JavaScript ±à³ÌÈËÔ±¶Ô±Õ°üµÄÀí½â´Ó&ldquo ......