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
Ïà¹ØÎĵµ£º
ͨ³£ÔÚ²Ù×÷xmlµÄʱºò£¬¶¼ÊÇͨ¹ýinputstream£¨ºÜ¶àÇé¿öÏÂÊÇFileInputStream£©À´¶ÁÈëxml²¢×ªÎªdomµÄ£¬ºÜ¶àÈË»áÓöµ½ÕâÖÖÇé¿öÊý¾Ý²»ÊÇ´ÓÎļþ¶ÁÈëµÄ¶øÊÇ´ÓStringÖÐÈ¡µÃµÄ
ÓÚÊÇ»áʹÓÃ
InputStream in = new ByteArrayInputStream (str.getBytes());À´È¡µÃinputstream £¬µ«ÊÇÕâÖÖInputStreamÖÐÊý¾Ý±»×ª³ÉÁËbyteÊý×飬ËùÒÔתdom ......
¡¡ÔÚSQL ServerÊý¾Ý¿âÖУ¬µ±ÄãÏëʹÓÃÒ»¸öÊý¾Ý£¬¶øÕâ¸öÊý¾Ý²»±£´æÔÚ±íÖУ¬¼ÆËãÁкÜÓÐÓá£ÀýÈ磬ÄãÓÐÒ»ÕÅ±í£¬Ëü°üÀ¨ÁÐdollar amounts, wholesale pricesºÍretail prices¡£Äã¿Ï¶¨²»ÏëÔÚÿ´Î²éѯ±íʱÀ´¼ÆËãÄÇÁ½ÁÐÖ®¼äµÄ²îÖµ£¬ÄãÏ£Íû½«ÆäÖµ±£´æÔÚµÚÈýÁÐÖУ¬ÈÃÆä×Ô¶¯¼ÆËãǰÁ½ÁÐÖ®¼äµÄ²îÖµ¡£¶ø´ËÁоÍÊǼÆËãÁС£
¡¡¡¡ÔÚSQL ServerÖ ......
// <!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 À´×öЩʲôÁË——ΪʲôÄãÒª»¨Ê±¼äÀ´Ñ§Ï°ÕâÑùһß´ÔӵŦ¿Î£¬ÒÔ¼°ÈçºÎ½«ÆäÓõ½ÄãµÄÍøÒ³ÉÏ£¿
¹ýÈ¥µÄ¼¸Äê¶ÔÎÒÀ´ËµÊÇÒ»¶ÎÓÐȤµÄʱ¼ä£¬ÒòΪÔÚÕâ¶Îʱ¼äÀï JavaScript µÄʹÓôÓÒ»ÖÖ±ßԵ֪ʶ³ÉΪÁË ......