javascript¶ÁÈ¡xmlʵÏÖÓ¦ÓóÌÐò²Ëµ¥Ð§¹û
/*Ñùʽ*/
<style type="text/css">
td{font-size:12px;}
.item{text-decoration:none;width:100%;height:100%; line-height:22px;cursor:default;color:Black;vertical-align:middle}
.staticTab{cursor:default;height:22px}
.staticTD{width:70px;text-align:center; vertical-align:middle;white-space:nowrap}
.dynamicTR{height:22px; vertical-align:middle}
.dynamicTab{width:60px;cursor:default;background-color:#ccebff;position:absolute;z-index:1}
.dynamicTDRight{text-align:right;font-size:9px;}
.dynamicTDCenter{text-align:left;white-space:nowrap}
</style>
/*--------------²Ëµ¥Ó¦Óõ½µÄjs--------------------*/
var menuHTML="";
function createXMLHttpRequest(){xmlHttp=(window.ActiveXObject)?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest();}
function getMenuData(){//´ÓºóÌ«»ñȡͷ²¿µÄµ¥¾Ý»òÉóÅúÈ˵ȵÄÐÅÏ¢
createXMLHttpRequest();
xmlHttp.open("GET","Menu.ashx?id="+(new Date()).getTime(),true);
xmlHttp.onreadystatechange=getMenu_onreadystatechange;//Óú¯ÊýÃû,²»¼ÓÀ¨ºÅ.
xmlHttp.send(null);
}
function getMenu_onreadystatechange(){//ÏàÓ¦´¦Àí
if(xmlHttp.readyState==4){
if(xmlHttp.status==200){
var menuXML=xmlHttp.responseXML.getElementsByTagName("menu");//childNodes
createStaticMenu(menuXML[0]);
}else
alert('·þÎñÆ÷¶Ë·¢Éú´íÎó!');
}
}
function getId(number,fatherId){
number+=1;
if(number<1
Ïà¹ØÎĵµ£º
ASP.NETÖ®XML£ºÒª²åÈëµÄ½Úµã³ö×Ô²»Í¬µÄÎĵµÉÏÏÂÎÄ
Òª²åÈëµÄ½Úµã³ö×Ô²»Í¬µÄÎĵµÉÏÏÂÎÄ
ʱ¼ä£º2009-06-12 08:15:11
Òì³£ÏêϸÐÅÏ¢: System.ArgumentException: Òª²åÈëµÄ½Úµã³ö×Ô²»Í¬µÄÎĵµÉÏÏÂÎÄ¡£
²úÉú×´¿ö£ºÏÖÔÚÓÐÁ½¸öxmlÎļþ£¬ÎÒÏë°ÑÕâÁ½¸öxmlºÏ²¢£¬ÔÚ¸øxml½Úµã²åÈëÒ»¸ö×Ó½Úµãʱ³öÏÖÁËÕâÑùµÄ´ ......
JavaScriptµÄwindow¶ÔÏóµÄopen·½·¨µÄÓï·¨¸ñʽÈçÏ£º
window.open("Ò³ÃæµÄURL","´°¿ÚÃû³Æ","´°¿Ú²ÎÊý");
Ò³ÃæµÄURL£ºÒ³ÃæµÄURL¿ÉÒÔÊÇÏà¶Ô·¾¶£¬Ò²¿ÉÒÔÊǾø¶Ô·¾¶¡£
´°¿ÚÃû³Æ£ºµ¯³ö´°¿ÚµÄÃû³Æ¿ÉÒÔ×ÔÐж¨Ò壬ËüµÄÒâÒåÔÚÓÚ£¬µ±ÄãË¢ÐÂÔʼµÄÕâҳȫ´°¿ÚµÄʱºò£¬µ¯³ö´°¿Ú¾Í»áË¢ÐÂÒ»´Î£»¶øÈç¹û°ÑÃû³ÆÊ¡ÂÔ£¬¸ÄΪ""£¬ÄÇôµ±Ë¢ÐÂÕâ ......
// <!CDATA[
//define
var xmlhttp;
var value=new Array();
var variable=new Array();
//Show Response MSG.
function handleStateChange()
{
var h=document.getElementById("Label1");
if(xmlhttp.readyState==4)
{
if(xmlhttp.status==200)
{
alert(xmlhttp. ......
ÔÎÄ£ºJavaScript - The this keyword
ÔÚ JavaScript ÖÐ this ÊÇ×îÇ¿µÄ¹Ø¼ü×ÖÖ®Ò»¡£ÕâÆªÌùÎľÍÊÇÒª¸æËßÄãÈçºÎÓúà this¡£
ÏÂÃæÏȽ²ÈçºÎÔÚevent handling
(ʼþ´¦Àí)ÖÐÓÃËü£¬ÔÙ½Ó×ÅÊǽ² this µÄÆäËûÓ÷¨¡£
ËùÓÐÕß(Owner)
ÏÈÀ´¿´¿´º¯Êý doSomething() ÀïµÄ this ¾¿¾¹Ö¸Ïò(refer to)ÁËʲô£¿
function doSomething() { ......