ÓÃjavascriptÏÔʾXML
ÓÃjavascriptÏÔʾXML
Äã¿ÉÒÔÓÃJavaScriptÏÔʾXML¡£¿ÉÒÔÓÃJavaScript (»ò VBScript)´ÓÒ»¸öXMLÎļþÖÐÊäÈëÊý¾Ý²¢ÔÚÒ»¸öHTMLÒ³ÃæÄÚÏÔʾXMLÊý¾Ý¡£ Òª¿´¿´XMLºÍHTMLÊÇÈçºÎÏ໥²¹³äµÄ£¬¿ÉÒÔÕâÑù×ö£ºÊ×ÏÈÕÒµ½XML Îĵµ(note.xml)£¬È»ºó´ò¿ªHTMLÎĵµ
(note.htm)£¬Õâ¸öHTMLÎĵµÖаüº¬ÁËÔĶÁXMLÎļþµÄJavaScript£¬²¢ÔÚHTMLÒ³ÃæÔ¤Ïȶ¨ÒåµÄ·¶Î§ÄÚÏÔʾÐÅÏ¢¡£
¡¡¡¡
¡¡¡¡ Äã¿ÉÒÔ×Ô¼ºÊÔÊÔ¿´¡£ ÔÚDOM SchoolÖУ¬Äã¿ÉÒÔ¿´µ½Ðí¶àÕâÀàµÄJavaScript¡£
¡¡¡¡ ÏÖʵÖеÄXML
¡¡¡¡ һЩÕæʵµÄÀý×Ó˵Ã÷ÁËÈçºÎÓÃXML Я´øÐÅÏ¢¡£
¡¡¡¡ Àý×Ó: XMLNews
¡¡¡¡ XMLNews ÊÇÒ»¸ö½»»»ÐÂÎźÍÆäËüÐÅÏ¢µÄ¹æ·¶¡£Ê¹ÓÃÕâÑùµÄÒ»¸ö±ê׼ʹÐÂÎÅÉú²úÕߺÍÐÂÎÅÏû·ÑÕ߶¼¸üÒ×ÓÚʹÓò»Í¬µÄÓ²¼þ¡¢Èí¼þºÍ±à³ÌÓïÑÔ¶Ô¸÷ÀàÐÂÎÅÐÅÏ¢½øÐÐÉú²ú¡¢½ÓÊÕ¼°¹éµµ¡£ Ò»¸öXML News ÎĵµµÄÀý×Ó£º
¡¡¡¡ < ?xml version="1.0"?>
¡¡¡¡ < nitf>
¡¡¡¡ < head>
¡¡¡¡ < title>Colombia Earthquake< /title>
¡¡¡¡ < /head>
¡¡¡¡ < body>
¡¡¡¡ < body.head>
¡¡¡¡ < headline>
¡¡¡¡ < hl1>143 Dead in Colombia Earthquake< /hl1>
¡¡¡¡ < /headline>
¡¡¡¡ < byline>
¡¡¡¡ < bytag>By Jared Kotler, Associated Press Writer< /bytag>
¡¡¡¡ < /byline>
¡¡¡¡ < dateline>
¡¡¡¡ < location>Bogota, Colombia< /location>
¡¡¡¡ < story.date>Monday January 25 1999 7:28 ET< /story.date>
¡¡¡¡ < /dateline>
¡¡¡¡ < /body.head>
Ïà¹ØÎĵµ£º
±¾ÎÄÖ÷ÒªÊdzöÓÚÓÐÅóÓÑʹÓÃÎÒÔÀ´Ð´µÄautocompleteµÄJS¿Ø¼þ¡£µ±Êý¾ÝÁ¿´óµÄʱºò£¬»á³öÏÖЧÂʼ«ÆäÂýµÄÇé¿ö£¬ÎÒÔÚÕâ¶Îʱ¼ä×ö³öµÄһЩ²âÊÔÒ²¼°Ò»Ð©¾Ñ飬Óë´ó¼Ò·ÖÏí£¬Èç¹ûÓдíµÄµØ·½£¬»¹ÇëÖ¸³ö¡£
¾¹ý²âÊÔ£¬ÎÒÃǻᷢÏÖÈçϵÄÇé¿ö»òÕß˵µÄ½áÂÛ£¬Èç¹ûÄúµÄ²âÊÔ½á¹ûÓëÎҵIJ»·û£¬Çë˵Ã÷ÔÒò£¬ÒÔ±ãÏ໥ѧϰ¡£
1£©µ±Ò»¸ö½Ï´óµÄHTML×Ö· ......
LuaÓëjavascriptµÄ²îÒì - [luaѧϰ]
תÔØ
http://huazjxy.blogbus.com/logs/60132016.html
LuaÄ£ÄâÆ÷js·½°¸
1.Óï·¨¼¶Ä£Äâ
luaÓëjsÓïÑÔ²îÒì
1.1×¢ÊÍ
js Ϊ//,luaΪ--.
1.2±äÁ¿
jsÀûÓÃvalÀ´ÉùÃ÷È«¾Ö±äÁ¿²»´æÔÚ¾Ö²¿±äÁ¿£¬luaÔò²»ÐèÒªÖ±½Ó¶¨Î»ÔòΪȫ¾Ö±äÁ¿£¬localÉùÃ÷ÔòΪ¾Ö²¿±äÁ¿¡£
1.3ÔËËã·û
js
+ - ......
javascriptÖÐevent.keycode
keycode 8 = BackSpace BackSpace
keycode 9 = Tab Tab
keycode 12 = Clear
keycode 13 = Enter
keycode 16 = Shift_L
keycode 17 = Control_L
keycode 18 = Alt_L
keycode 19 = Pause
keycode 20 = Caps_Lock
keycode 27 = Escape Escape
keycode 32 = space space ......
/**
* JavaScript ÊÇÃæÏò¶ÔÏóµÄÓïÑÔ£¬µ«ÊÇËûµÄÃæÏò¶ÔÏó²»ÊÇ»ùÓÚÀàµÄ£¬ÊÇ»ùÓÚÔÐ͵Ä;
* µ«ÊÇËûµÄһЩÌØÐÔ(º¯ÊýÊÇÊý¾Ý)£¬Ê¹µÃËü¿ÉÒÔÄ£Äâ»ùÓÚÀàµÄÃæÏò¶ÔÏ󣬵«ÊÇ JavaScript ²¢²»Ö§³ÖºÍ Java Ò»ÑùµÄÀ࣬
* Òò´Ë JavaScript ÖеÄ"Àà"¿ÉÒÔ³Æ×÷"αÀà"
*/
//
/**
* ¹¹Ô캯Êý: js ÖÐÓÃÀ´ºÍ new ÔËËã·ûÒ»ÆðʹÓõĺ¯Êý³Æ× ......
calcu() ----º¯ÊýʵÏÖÁ½¸öÊýÏà³Ë
document.write(); ---´òÓ¡
document.calc.ÔªËØÃû.value; --»ñµÃ±íµ¥µÄÖµ
document.±íµ¥Ãû¡£±íµ¥ÔªËØÃû¡£value Ϊ±íµ¥¸³Öµ
¶¨Ò庯Êý£º
function Ãû×Ö()
{
//javaScriptÔ¤Óï¾ä
}
onClick="º¯ÊýÃû";  ......