JavaScript²Ù×÷XMLÎĵµ
×î½üÔÚѧXML£¬¿´ÊéµÄ¹ý³ÌÖÐ˳±ã×öµã±Ê¼Ç£¬¹©ÒÔºó²Î¿¼
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<mce:script language=javascript><!--
var oNodeMap,str,oList,item;
//´´½¨DOMDocument¶ÔÏó
var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
//²»ÔÊÐíÒì²½¼ÓÔØ£¬½Å±¾»áµÈ´ýÎĵµÈ«²¿±»ÏÂÔغó²ÅÖ´ÐдúÂë
xmlDoc.async = false;
//°ÑXMLÎĵµÔØÈëDOMDocument¶ÔÏó
xmlDoc.load("MyXml1.xml");
if(xmlDoc.parseError!= 0)//ÅжÏ×°Èë¹ý³ÌÖÐÊÇ·ñ²úÉú´íÎó
{
document.writeln(xmlDoc.parseError.reason+"<br>");
}
else
{
//»ñµÃ¸ùÔªËؽڵãµÄÊôÐÔ£¬²¢½«ÊôÐԵĸöÊýÊä³ö
oNodeMap = xmlDoc.documentElement.attributes;
document.writeln("¸ùÔªËؽڵãµÄÊôÐÔ¸öÊýΪ£º"+oNodeMap.length+"<br>");
//»ñµÃ¸ùÔªËؽڵãµÄÃû×Ö£¬²¢Êä³öµ½Ò³ÃæÉÏ
str = xmlDoc.documentElement.nodeName;
document.writeln("¸ùÔªËؽڵãµÄÃû×Ö£º"+str+"<br>");
//»ñµÃ¸ùÔªËؽڵãµÄ×ӽڵ㼯ºÏ
oList = xmlDoc.documentElement.childNodes;
//Êä³ö¸ö×Ó½ÚµãµÄÄÚÈÝ
document.writeln("¸÷×Ó½ÚµãµÄ¸öÊýΪ£º"+oList.length+"<br/>");
document.writeln("¸÷×Ó½ÚµãµÄÄÚÈÝΪ£º<br/>");
for(var i=0;i<oList.length;++i)
{
document.writeln(oList[i].xml+"<br/>");
}
}
var node = xmlDoc.documentElement.childNodes[0];
document.writeln("½ÚµãÀàÐÍ£º"+node.nodeType+"<br>");
document.writeln("¸ùÔªËؽڵãÃû³Æ£º"+node.ownerDocument.documentElement.tagName+"<br>");
document.writeln("µ±Ç°½ÚµãµÄÊôÐÔ"+node.attributes[0].value+"<br>");
document.writeln("µ±Ç°½Úµã¼°Æä×Ó½ÚµãËù°üº¬µÄÎı¾£º" +node.text+"<br>");
// --></mce:script>
</HEAD>
<BODY>
</BODY>
</HTML>
MyXml1.xmlµÄ´úÂëÈçÏ£º
<?xml version="1.0" encoding="gb2312"?>
<person id="1" idd="2">
<person pid="E01">
<name>ÕÅÈý</name>
<address>½ËÕÊ¡ÐìÖÝÊÐ</address>
<tel>1456321</tel>
<email>zhangsan@16
Ïà¹ØÎĵµ£º
Summary ×ܽá
When web pages or applications begin to feel slow, analyzing assets as they come over the wire and profiling scripts while they are running allows you to focus your optimization efforts where they are needed most.
µ±ÍøÒ³»òÓ¦ÓóÌÐò±äÂýʱ£¬·ÖÎ ......
JavascriptÎļþ¼°Îļþ¼Ð²Ù×÷
Ò»¡¢¹¦ÄÜʵÏÖºËÐÄ£ºFileSystemObject ¶ÔÏó
ÒªÔÚjavascriptÖÐʵÏÖÎļþ²Ù×÷¹¦ÄÜ£¬Ö÷Òª¾ÍÊÇÒÀ¿¿FileSystemobject¶ÔÏó¡£
¶þ¡¢FileSystemObject±à³Ì
ʹÓÃFileSystemObject ¶ÔÏó½øÐбà³ÌºÜ¼òµ¥£¬Ò»°ãÒª¾¹ýÈçϵIJ½Ö裺 ´´½¨FileSystemObject¶ÔÏó¡¢Ó¦ÓÃÏà¹Ø·½·¨¡¢· ......
javascriptµÄStringÀàÄÚÖú¯Êýreplace(regexp, newString)º¯ÊýÌṩÁË×Ö·û´®Ìæ»»¹¦ÄÜ£¬´Óº¯ÊýÔÐÍÉÏ¿ÉÒÔ¿´³öÖ§³Ö Regular Exp¡£´Ëº¯Êý¹¦Äܷdz£ÊµÓ㬵«Ò²Óм¸¸öµØ·½Óеã»ìÏý£¬ÏÂÃæͨ¹ýʵ¼ÊµÄÀý×ÓÀ´ËµÃ÷£º
±ÈÈçÎÒÃÇÏÖÔÚÒªÕë¶Ô´®
var src="<a href="http://xx.com/a/2010 ......
¡ö´ò¿ª¡ö
<input name=Button onClick=document.all.WebBrowser.ExecWB(1,1) type=button value=´ò¿ª>
<OBJECT classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2 height=0 id=WebBrowser width=0></OBJECT>
¡öÁí´æΪ¡ö
<input name=Button onClick=document.all.WebBrowser.ExecWB(4,1) typ ......
JavaScriptµÄä¯ÀÀÆ÷¶ÔÏóÏê½â
Ò»¡¢ä¯ÀÀÆ÷¶ÔÏó²ã´Î¼°ÆäÖ÷Òª×÷ÓÃ
¶þ¡¢Îĵµ¶ÔÏó¹¦Äܼ°Æä×÷ÓÃ
Èý¡¢·¶Àý
ʹÓÃä¯ÀÀÆ÷µÄÄÚ²¿¶ÔÏóϵͳ, ¿ÉʵÏÖÓëHTMLÎĵµ½øÐн»»¥¡£ËüµÄ×÷ÓÃÊǽ«Ïà¹ØÔªËØ×éÖ¯°ü×°ÆðÀ´£¬Ìṩ¸ø³ÌÐòÉè¼ÆÈËԱʹÓ㬴Ӷø¼õÇá±à³ÌÈ˵ÄÀͶ¯£¬Ìá¸ßÉè¼ÆWebÒ³ÃæµÄÄÜÁ¦¡£
Ò»¡¢ä¯ÀÀÆ÷¶ÔÏó²ã´Î¼°ÆäÖ ......