µ¥ÒýºÅ,Ë«ÒýºÅ,javascript,HTML,תÒå×Ö·û
ÔÚÒ»¸öÍøÒ³Öеİ´Å¥£¬Ð´onclickʼþµÄ´¦Àí´úÂ룬²»Ð¡ÐÄд³ÉÈçÏ£º
<input value="Test" type="button" onclick="alert(""OK"");" />
IEÌáʾ³ö´íºó£¬ÔÙÂþ²»¾ÐĵظÄΪ£º
<input value="Test" type="button" onclick="alert(\"OK\");" />
½á¹û»¹Êdzö´í¡£
Õâʱ£¬ÎÒ¾ÍÏ벻ͨÁË£¬ËäÈ»ÎÒÖªµÀ×îÖ±½ÓµÄ½â¾ö·½·¨ÊÇд³ÉÕâÑù£º
<input value="" type="button" onclick="alert('OK');" />
µ«ÎªÊ²Ã´javascriptÖеÄתÒå×Ö·û\ûÓÐЧ¹ûÁËÄØ£¿ ºóÀ´ÕÒµ½Ò»¶ÎÕý³£µÄ´úÂ룺
<input value="Test" type="button" onclick="alert("OK");" />
Õâʱ²ÅÀí½â£¬ÔÀ´Õâʱ£¬»¹ÊǹéÓÚHTMLµÄ¹ÜϽ·¶Î§£¬ËùÒÔתÒå×Ö·ûÓ¦¸ÃʹÓÃHTMLµÄ£¬¶ø²»ÊÇjavascriptµÄ¡£Á½¸öË«ÒýºÅµÄ×ö·¨ÊÇvbScriptµÄ£¬\"ÕâÖÖ×ö·¨ÔòÊÇjavascriptµÄ£¬¶øHTMLµÄ£¬ÔòÊÇÓÃ"£¬´ËÍ⻹¿ÉÒÔʹÓãº"¡¢'¡£
HTMLתÒå×Ö·û±í
×Ö·û
Ê®½øÖÆ
תÒå×Ö·û
“
"
"
&
&
&
<
<
<
>
>
>
²»¶Ï¿ª¿Õ¸ñ(non-breaking space)
 
×Ö·û
Ê®½øÖÆ
תÒå×Ö·û
×Ö·û
Ê®½øÖÆ
תÒå×Ö·û
×Ö·û
Ê®½øÖÆ
תÒå×Ö·û
?
¡
¡
Á
Á
Á
á
á
á
¡é
¢
¢
Â
Â
ˆ
â
â
â
¡ê
£
£
Ã
Ã
Ã
ã
ã
ã
¤
¤
¤
Ä
Ä
Ä
ä
ä
ä
£¤
¥
¥
Å
Å
˚
å
å
å
|
¦
¦
Æ
Æ
Æ
æ
æ
æ
§
§
§
Ç
Ç
Ç
ç
ç
ç
¨
¨
¨
È
È
È
è
è
è
©
©
©
É
É
É
é
é
é
a
ª
ª
Ê
Ê
&
Ïà¹ØÎĵµ£º
ÍøÂ翪·¢ÕßÖ®¼äÕýÔÚ½øÐÐÒ»ÏîØü¹ØÍøÂçδÀ´µÄ¼¤ÁÒ±çÂÛ£ºÊÇ·ñ¸Ã¼ÌÐøʹÓÃAdobe Flash£¬»ò¸ÄÓøüеļ¼Êõ£¿
ÕâÏîÕùÂÛÒѳÖÐø¶àÄ꣬µ«ÉÏÖÜÆ»¹û¹«Ë¾·¢±íµÄiPad²»Ö§³ÖFlash£¬Ôٴγ´ÈÈÕâ¸ö»°Ìâ¡£ÔÚÄÇ֮ǰ£¬AdobeÔøµÍ×Ë̬µØ±íʾ£¬Ö»ÒªÆ»¹ûµãÍ·£¬ËûÃǷdz£ÀÖÒâΪiPhoneÌṩFlash¡£µ«Adobe¼¼Êõ¹ÙKevin LynchËƺõ²»ÏëÔÙ½²¿ÍÌ×»°£¬ËûÔÚ2ÈÕµ ......
//´´½¨Ò»¸öеÄÔªËؽڵ㣬ԪËØÃûʹÓÃsTagName¶¨Òå
oElementNode = document.createElementNode(sTagName);
//´´½¨Ò»¸öеĽڵ㣬½ÚµãÃûʹÓÃsTextValue¶¨Òå
oTextNode = document.createTextNode(sTextValue);
//ΪԪËظ³Ò»¸öеÄÊôÐÔ£¬ÊôÐÔÃûʹÓÃsName
oAttribute = document.createAttribute(sName);
//´´½¨Ò»¸öÐ嵀 ......
JavaScript ¿ÉËãÊÇÊÀ½çÉÏ×îÁ÷Ðеıà³ÌÓïÑÔ£¬ËüÔø±» Web ¿ª·¢Éè¼ÆʦÌùÉÏجÃεıêÇ©£¬ËäÈ»ÕæÕýµÄجÃÎÆäʵÊÇ DOM
API£¬Õâ¸ö±»´óÁ¿µÄ¿ª·¢ÓëÉè¼ÆʦËæÊÖÄéÀ´ÔöÇ¿ËûÃÇµÄ Web Ç°¶ËµÄ½Å±¾ÓïÑÔ£¬Èç½ñÔ½À´Ô½±»ÖØÊÓ£¬ËäÔòÈç´Ë£¬JavaScript
ÈÔȻӵÓкܶàÈÃÈ˷ѽâµÄ¶«Î÷¡£
1. ËüÒÔ Java ÃüÃû£¬µ«²¢²»ÊÇ Java
Ëü×î³õ½Ð Mocha£¬ ½ÓןÄà ......
javascript²¶»ñ´°¿Ú¹Ø±ÕʼþÓÐÁ½ÖÖ·½·¨
1.ÓÃjavascriptÖØж¨Òå window.onbeforeunload() ʼþ
ÔÚjavascriptÀﶨÒåÒ»¸öº¯Êý¼´¿É
function window.onbeforeunload() { alert("¹Ø±Õ´°¿Ú")}
alert()ʼþ½«»áÔڹرմ°¿ÚÇ°Ö´ÐУ¬ÄãÒ²¿ÉÒÔÓû§¾ö¶¨ÊÇ·ñ¹Ø±Õ´°¿Ú
function window.o ......
web¿ª·¢¹ý³ÌÖУ¬ÓÐʱºò´ÓÊý¾Ý¿â²é³öÀ´µÄÊý¾Ý¹ý³¤£¬Ç°Ì¨Ò³ÃæÈç¹ûûÓпØÖƺ㬻áÏÔʾºÜ³¤µÄÊý¾Ý£¬Ó°ÏìÃÀ¹Û£¬Õâ¸öʱºò¾ÍÐèÒªÖ»ÏÔʾ¹Ì¶¨µÄ³¤¶È£¬½«¶àÓàµÄÒÔ¡°......¡±»òÕßÖ±½Ó½ØÈ¡²»ÏÔʾ£¬¿ÉÒÔʹÓÃ
text-overflow:cl ......