JavaScriptµ÷ÊÔ·½·¨Ö®Ò»
ʹÓÃtry{...}catch(){} ·½Ê½£¬Àý×ÓÈçÏ£º
function showAlarm(strObject){
try{
svgElement = document.getElementById(strObject);
svgElement.setAttribute("visibility","visible");
setTimeout("hideAlarm()",3000);//3Ãëºó½áÊø±¨¾¯
}catch(ex){
alert("º¯ÊýshowAlarm()·¢ÉúÒì³££º"+ex.description);
}
Ïà¹ØÎĵµ£º
< a href =
"#"
onClick =
"javascript:window.external.AddFavorite(document.URL,document.title);return
false"
rel=
"sidebar"
> Êղر¾Ò³ </ a >
È¡µÃµ±Ç°Ò³µÄURL: document.URL
È¡µÃµ±Ç°Ò³µÄtitle: document.title
ʵÏÖÔÚFirefoxÖГÊÕ
²Ø±¾Ò ......
ÓÉÓÚ°²È«·½ÃæµÄ¿¼ÂÇ£¬
Javascript
±»ÏÞÖÆÁË¿çÓò·ÃÎʵÄ
ÄÜÁ¦£¬µ«ÊÇÓÐʱºòÎÒÃÇÏ£ÍûÄܹ»×öһЩºÏÀíµÄ¿çÓò·ÃÎʵÄÊÂÇ飬ÄÇôÔõô°ìÄØ£¿
ÕâÀï·ÖÁ½ÀàÇé¿ö£º
Ò»¡¢»ùÓÚͬһ¸¸ÓòµÄ×ÓÓòÖ®¼äÒ³ÃæµÄ·ÃÎÊ
&nb ......
Ê×ÏÈÉèÖÃIE, ÒÀ´ÎÑ¡Ôñ ¹¤¾ß-> Internet Ñ¡Ïî-> ¸ß¼¶, ÕÒµ½ ä¯ÀÀ ϵÄÁ½¸ö½ûÓýű¾µ÷ÊÔ¸´Ñ¡¿ò, ½«ÆäÈ¡ÏûÑ¡Ôñ(IEĬÈϽ«ÕâÁ½ÏîÑ¡ÖÐ, ²»ÄܽøÐнű¾µ÷ÊÔ),
1. µ÷ÊÔJS½Å±¾Îļþ(*.jsÎļþ)
Ö±½ÓÔÚJSÎļþÖÐF9ÉèÖöϵã, F5ÔËÐе÷ÊÔ¼´¿É.
2. µ÷ÊÔÒ³ÃæÎļþÖнű¾(*.aspxÖÐJS½Å±¾)
......
ÎÒÏëʹÓùýajaxµÄ¶¼³£¼ûÕâÑùµÄ´úÂ룺
<a href="javascript:doTest2();void(0);">here</a>
µ«Õâ¶ùµÄvoid(0)¾¿¾¹ÊǺκ¬ÒåÄØ£¿
JavascriptÖÐvoidÊÇÒ»¸ö²Ù×÷·û£¬¸Ã²Ù×÷·ûÖ¸¶¨Òª¼ÆËãÒ»¸ö±í´ïʽµ«ÊDz»·µ»ØÖµ¡£
void ²Ù×÷·ûÓ÷¨¸ñʽÈçÏ£º
1. javascript:void (expression)
2. javascript:void expression
expr ......