javascript ÈçºÎÔÚ±¾µØ´´½¨¶ÁдxmlÎļþ£¿
ÐèÒª¼æÈÝie firefox safari µÈä¯ÀÀÆ÷
IE ¿ÉÒÔÓÃFSO µ«ÊÇÔÚÆäËûä¯ÀÀÆ÷²»ÄÜÓÃ
Ò»°ãµÄä¯ÀÀÆ÷´¦ÓÚ°²È«¿¼ÂǶ¼²»ÔÊÐíJavaScript¶Áд±¾µØÎļþµÄ°É
XMLÎĵµÄÚÈÝÈçÏ£¨user.xml£©£º
<?xml version="1.0" encoding="gbk"?>
<items>
<item sex="male" age="23" job="developer" />
<item sex="male" age="30" job="manager" />
<item sex="male" age="22" job="test" />
<item sex="male" age="40" job="boss" />
</items>
¶ÁÈ¡²Ù×÷ÈçÏÂ:
<html>
<head>
<title>users </title>
</head>
<body>
<table border="1" align="center">
<tbody >
<tr> <td>ID </td> <td>ÐÕÃû </td> <td>ÐÔ±ð </td> <td>ÄêÁä </td> <td>ְλ </td> </tr>
<tbody>
</table>
<script language="javascript">
//´´½¨xml dom¶ÔÏó,¶ÁÈ¡xmlÎļþ
doc = new ActiveXObject("MSXML2.DOMDocument.3.0");
doc.load("users.xml");
//×ÓÔªËØ
var items = doc.documentElement.childNodes;
var oTbody = document.all.tbody;
/
Ïà¹ØÎÊ´ð£º
vbÖÐÔõôͨ¹ýxmlÀ´½âÎöÊý¾Ý¿âÖеÄ×Ö¶ÎÖµ¡£
û°ì·¨ÓÃXML½âÎöÊý¾Ý¿âµÄ×Ö¶ÎÖµ£¬³ý·ÇÊý¾Ý¿âÖб£´æµÄÊÇXML¸ñʽµÄ×Ö·û´®Îĵµ¡£
XMLÓÃÀ´Õ¹Ê¾²ã´ÎµÄÊý¾Ý¡£
Êý¾Ý¿âÒ»°ãÊǶþάÊý¾Ý¡£
Êý¾Ý¿âÖб£´æµÄÊÇXML×Ö·û´®¸ñʽ£ ......
Ç°Ò»°æÔÚÕâÀï
½üÀ´¿´ÁËDeanµÄ¡°Convert any colour value to hex in MSIE¡±£¬ÖÕÓÚ½â¾öÁ˸ù¾Ý¹Ø¼ü×Ö»ñÈ¡ÑÕÉ«rgbÖµµÄÎÊÌâ¡£
˳±ã°Ñ³ÌÐòÒ²ÖØÐÂÕûÀíÒ»·¬£¬²¢Ê¹ÓÃÁË×î½üÕûÀíµÄ¹¤¾ß¿â¡£
»¶ÓÀ´ÎÒµÄblog½» ......
ÎÒ¼ÒµçÄÔÔÀ´×°µÄÊÇIE7ä¯ÀÀÆ÷£¬µ«ÊÇ×î½üÎÒ°Ö°Ö¶¯ÁËij¸öÅäÖ㬵¼ÖÂIE7»·¾³Ï²»ÄÜÔËÐÐflashºÍjavascript£¬¿´sina»òÕßÆäËûÐÂÎÅÍøÕ¾É϶¼ÊÇÒ»¿éÒ»¿é¿Õ°×£¬µÇ½twitterÒ²²»³É¹¦£¬±¨£ºÓÉÓÚ²»Ö§³Öjavascript£¬µ¼Ö²»Äܵǽ¡£ ......
JavaScriptÈçºÎ»ñÈ¡iframeµÄÄÚÈÝ£¿¼±Ç󣡣¡£¡
Îļþ1.html
Îļþ2.html£¨±»ÒýÈëµÄÎļþ£©¡£
HTML code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www. ......