¹ØÓÚjavascript º¯ÊýµÄµ÷ÓÃ
ÄÄλʦ¸çʦ½ãÄܹ»°ïæ½â¾öһϣ¬ÔÚjsp½Å±¾ÖÐÄÜ·ñµ÷ÓÃjavascriptº¯Êý£¬Èç¹ûÄÜÔõôµ÷Óã¿
¾ÍÊÇ˵¼ÙÈçÒ»¸öjavascript º¯ÊýÓÐÒ»¸ö·µ»ØÖµÈçreturn“a”;
ÔÚjsp½Å±¾ÖÐÉùÃ÷Ò»¸öStringÀàÐ͵ıäÁ¿Ôõôµ÷ÓÃÉÏÃæµÄº¯ÊýÀ´½ÓÊÜ·µ»ØµÄÖµ£¡
Ï£ÍûÄÜ°ïæ½â¾öÏÂ,ллÁË£¡
Ïà¹ØÎĵµ£º
1.ÀûÓà document.location.href="/index.html" ¼ÒÔÚÒ»¸öÒ³Ãæ
2.ÀûÓÃthrow²¶»ñÒì³£
try
{
if(x>10)
throw "Err1"
}
catch(er)
{
if(er=="Err1")
}
3.ʹÓ÷´Ð±¸Ü¶Ô´úÂë½øÐÐÕÛÐУº
document.write("Hello \
World!")
4.match() ·½·¨
ÈçºÎʹÓà match() À´²éÕÒ×Ö·û´®ÖÐÌض¨µÄ×Ö·û£¬²¢ÇÒÈç¹ûÕÒµ½µ ......
javascriptµÃµ½ÆÁÄ»·Ö±æÂʺÍÍøÒ³¿É¼ûÇøÓòµÈ·½·¨
<body><SCRIPT LANGUAGE="JavaScript">...
var s = "";
s&n ......
Õ⼸Ì죬ÒòΪһ¸öÏîÄ¿ÖеÄbug¶øÍ·Í´¡£
ÕâÊÇÒ»¸öÌõÂëɨÃè³ÌÐò£¬ÎªÁ˱£Ö¤É¨Ã蹤×÷µÄÁ¬ÐøÐÔ£¬ÔÚÒ³ÃæÖÐÀûÓÃ
Javascript×Ô¶¯²¶»ñkeydownʼþ£¬ÒòΪÌõÂëɨÃèǹÔÚÍê³ÉÒ»´ÎɨÃèÈÎÎñºó»á´¥·¢»Ø³µ¼ü£¬ËùÒÔ£¬ÔÚkeydownʼþÖÐÅжÏÊÇ·ñ
keyCode==13£¬È»ºó´¥·¢Ò³ÃæÖÐÒ»¸öÒþ²ØµÄ°´Å¥£¬Ìá½»´ËÊý¾Ý±£´æÖÁ·þÎñÆ÷¡£
³ÌÐòÖУ¬ÎªÌõÂëÊäÈëÎÄ ......
±¾²©¿ÍתÔØÓÚ£ºhttp://www.cnblogs.com/yage/archive/2009/11/20/1607220.html
¶ÔÓÚÕýÔÚ´ÓÊ»òÕß´òËã´Óʱà³ÌµÄÈËÀ´Ëµ£¬ÃæÏò¶ÔÏóÊÇÒ»¸ö¶úÊìÄÜÏêµÄ´Ê£¬¼¸ºõÿһ¸öÈ˶¼ÄÜÁоٳöһЩÃæÏò¶ÔÏóµÄ±à³ÌÓïÑÔ£¬ÀýÈç
C++£¬
JAVA£¬
C#µÈµÈ¡£Æäʵ£¬ÃæÏò¶ÔÏóµÄ˼ÏëÊǶÀÁ¢ÓÚ±à³ÌÓïÑԵģ¬ÀýÈçÔÚ
C#ÖУ¬ÔÚÒ»¸ö¾²Ì¬ÀàµÄ¾² ......