Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

¹ØÓÚJavascript½âÎöXML¿çä¯ÀÀÆ÷µÄ³¢ÊÔ

javascriptµÄ¿çä¯ÀÀÆ÷µÄÎÊÌâÕæµÄºÜ·³ÈË£¬
ÒÔÇ°×öAJAXµÄʱºò¶¼ÊÇÓÃresponseText ÒòΪ¹¦ÄÜÒªÇ󶼲»ÊǺܸ´ÔÓ
ÏÖÔÚÏë×öһЩRSSµÄºÏÕû£¬¾õµÃÓÃJSÀ´×öÄܽÚÊ¡ºÜ¶àµÄ·þÎñÆ÷×ÊÔ´
¾¡Á¿ÍùRIAµÄÕâ±ß¿¿Â£°É¡£
ÒòΪÊÖÍ·ÉÏûÓÐÒ»·ÝÍêÕûµÄDOMµÄÎĵµ£¬½âÎöXMLÀ´ÕæµÄ¿ÉÒÔ˵µÄ½¹Í·Àö
ËäÈ»ÓÃFOR IN ÄܶÁ³ö¶ÔÏóµÄËùÓÐÊôÐԺͷ½·¨£¬¿ÉϧÕâÒ»ÕжÔXMLDOM²»ºÃÓã¬
ÒòΪÎÒÃÇ»ñµÃµÄ¶¼ÊÇÒѾ­³õʼ»¯µÄʵÀý¶ø²»ÊÇÕâ¸öÀ࣬Õâ¸ö¿àѽ¡£
ÏÂÃæÊÇÎÒÓÃÁËÁ½¸öÍíÉϵÄʱ¼äÍê³ÉµÄ³¢ÊÔ£¨Ö®Ç°ÊÔ¹ýÓõݹ飬¿Éϧ²»ÖªµÀÔõôÅжϽáÊø£¬±¾À´Ïë·¨ºÜ¼òµ¥£¬¾õµÃÈç¹ûµ±Ç°node µÄchild Ϊ0µÄʱºòÓ¦¸Ã¾Í½áÊøÁË£¬¿ÉÊDz»ÊÇÕâÑùµÄ£¬Ë­ÓÐÕâ·½ÃæµÄ×ÊÁÏ·¢ÎÒÒ»·Ýѽ£¬¸Ð¼¤²»¾¡£©
<?xml version="1.0" encoding="UTF-8"?>
<!--ISBNºÅ£¬ÊéÃû
×÷Õߣ¨¿ÉÒÔ¶à¸ö£©
³ö°æÉ磨°üº¬µØÖ·£¬ÁªÏµµç»°£¨¿ÉÒÔ¶à¸ö£©£©
ËùÊô·ÖÀà
shmilyhe@163.com
-->
<books>
<book ISBN="001">
<name>Java</name>
<authors>
<author>ivan</author>
<author>danny</author>
</authors>
<producer>
<address>¹ãÖÝ</address>
<phone>020-88888888</phone>
<phone>020-88888881</phone>
</producer>
<category>¿Æ¼¼</category>
</book>


<book ISBN="002">
<name>ħÊÞ</name>
<authors>
<author>ivan</author>
<author>danny</author>
</authors>
<producer>
<address>¹ãÖÝ</address>
<phone>020-88888888</phone>
<phone>020-88888881</phone>
</producer>
<category>ÓÎÏ·</category>
</book>


<book ISBN="003">
<name>³¤½­ÈýÏ¿</name>
<authors>
<author>ivan</author>
<author>danny</author>
</authors>
<producer>
<address>¹ãÖÝ</address>
<phone>020-88888888</phone>
<phone>020-88888881</phone>
</producer>
<category>µØÀí</category>
</book>
</books>
JS£º


Ïà¹ØÎĵµ£º

Javascript Éè¼Æģʽ

 Javascript
ÊÇÒ»¸öºÜÇ¿´óºÜÁé»îµÄÓïÑÔ£¬Äã¼È¿ÉÒÔ°ÑËüµ±×÷ÃæÏò¹ý³ÌµÄÓïÑÔ£¬Ò²¿ÉÒÔ°ÑËüµ±×÷ÃæÏò¶ÔÏóµÄÓïÑÔÀ´Óá£ÕâƪÖ÷Ҫ̽ÌÖÒ»ÏÂÈçºÎÓÃjavascriptÀ´ÊµÏÖÒ»¸ö
SingletonÀà¡£ÏàÐÅÓÐЩ±à³Ì¾­ÑéµÄÅóÓÑÃǶÔSingletonģʽ¶¼ºÜÊìϤ¡£Singleton
ģʽÖ÷ÒªÓÃÀ´ÏÞÖÆÒ»¸öÀàµÄ¶à´ÎʵÀý»¯¡£Ò»°ãÀ´ËµÏµÍ³´´½¨µÄʵÀýÔ½ÉÙ£¬Õ¼ÓÃ×ÊÔ´Ô ......

Javascript Best Practices

1. ×ÜÊÇʹÓà ‘var’
ÔÚJavaScript
ÖУ¬±äÁ¿²»ÊÇÈ«¾Ö·¶Î§µÄ¾ÍÊǺ¯Êý·¶Î§µÄ£¬Ê¹ÓÔvar”¹Ø¼ü´Ê½«ÊDZ£³Ö±äÁ¿¼ò½àÃ÷Á˵Ĺؼü¡£µ±ÉùÃ÷Ò»¸ö»òÕßÊÇÈ«¾Ö»òÕßÊǺ¯Êý¼¶£¨function-level£©µÄ±äÁ¿£¬Ðè×ÜÊÇÇ°ÖÔvar”¹Ø¼ü´Ê£¬ÏÂÃæµÄÀý×Ó½«Ç¿µ÷²»ÕâÑù×öDZÔÚµÄÎÊÌâ¡£
²»Ê¹Óà Var Ôì³ÉµÄÎÊÌâ
var i=0; ......

¼òµ¥µÄjavascriptÍÏקʵÀý

¼òµ¥µÄjavascriptÍÏקʵÀý----> ±¾ÈËÔ­´´£¨244796562@qq.com£©
<html>
<head>
<title>ÍÏק²âÊÔ</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div id="box" style="position:absolute;top:100px;left:200px;width ......

JavaScriptÖеÄdocument.cookieµÄʹÓÃ

ÎÒÃÇÒѾ­ÖªµÀ£¬ÔÚ document ¶ÔÏóÖÐÓÐÒ»¸ö cookie ÊôÐÔ¡£µ«ÊÇ Cookie ÓÖÊÇʲô£¿“ijЩ Web Õ¾µãÔÚÄúµÄÓ²ÅÌÉÏÓúÜСµÄÎı¾Îļþ´æ´¢ÁËһЩÐÅÏ¢£¬ÕâЩÎļþ¾Í³ÆΪ Cookie¡£”—— MSIE °ïÖú¡£Ò»°ãÀ´Ëµ£¬Cookies ÊÇ CGI »òÀàËÆ£¬±È HTML ¸ß¼¶µÄÎļþ¡¢³ÌÐòµÈ´´½¨µÄ£¬µ«ÊÇ javascript Ò²ÌṩÁË¶Ô Cookies µÄºÜ ......

javascript Ìæ»»¿Õ¸ñ

 1.×Ôhttp://jorkin.reallydo.com/article.asp?id=275
µÚÒ»´Î·¢ÏÖJavaScriptÖÐreplace() ·½·¨Èç¹ûÖ±½ÓÓÃstr.replace("-","!") Ö»»áÌæ»»µÚÒ»¸öÆ¥ÅäµÄ×Ö·û.
¶østr.replace(/\-/g,"!")Ôò¿ÉÒÔÈ«²¿Ìæ»»µôÆ¥ÅäµÄ×Ö·û(gΪȫ¾Ö±êÖ¾)¡£
replace()
The replace() method returns the string that results when you replac ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ