ÇóÖú ÈçºÎʹÓÃjavascriptÑ»·¶ÁÈ¡xmlÖ¸¶¨½ÚµãµÄÖµ
xmlÎļþ ÄÚÈÝΪ£º
<?xml version="1.0" encoding="utf-8" ?>
<UserInfo>
<User>
<name>jyhlp </name>
<password>jp6661 </password>
</User>
<User>
<name>mjhlp </name>
<password>mj6661 </password>
</User>
</UserInfo>
ÒªÓÃjavascriptÑ»·¶ÁÈ¡nameºÍpasswordµÄÖµ
ÕâÑùдÓÐʲô´íµÄÂð£¿
xmldoc.loadXML("/hong/XMLFile.xml");
var items = xmldoc.getElementsByTagName("User");
for (var i = 0; i < items.length; i++) {
var name = xmldoc.getElementsByTagName("name")[i].childNodes[0].nodeValue;
var Psw = xmldoc.getElementsByTagName("password")[i].childNodes[0].nodeValue;
if (form1.user.value == name && form1.psw.value == Psw) {
alert("OK");
window.location.href = '';
}
else {
alert("NO"
Ïà¹ØÎÊ´ð£º
ÇëÎʸ÷λ´óʦ£¬ÎÒÏÖÔÚÐèÒª½«XMLµÄÊý¾ÝʵʱµÄ´æÈëµ½Êý¾Ý¿âÖУ¬ÎÒÊÇÓÃasp±àµÄ³ÌÐò£¬´óÁ¿ÃÇ°ïæ·ÖÎö һϣ¡£¡£¡
ÏÂÃæÊÇÎÒµÄXMLÎļþ´úÂë
XML code:
<?xml version="1.0" encoding="utf-8"? ......
ÎÒÔÚºǫ́µ÷ÓÃJavaScriptµÄʱºò£¬ËûÊÇÔÚºǫ́°ÑʼþµÄ´úÂëÖ´ÐÐÒ»´ÎºóÔÚÖ´ÐÐJavaScript·½·¨
ÓÐʲô°ì·¨ ÔÚÖ´ÐÐJavaScript·½·¨µÄʱºòͣס£¬ÔÚÖ´ÐкóÃæµÄ´úÂë
²»Ì«Ã÷°×°¡£¬ËµÇå³þµã°É
¾ÍÊÇÖ´Ðкǫ́´úÂëµÄʱºò ......
rt£¬
ÖÐeÎĽԿɣ¬chmµÄ£¬pdfµÄ¾ÍËãÁË£¬ÎÒ×Ô¼ºÏÂÔص½ÁË
ûÈËÓУ¿
²»ÖªµÀÄã˵µÄµç×ÓÊéÊÇʲôÑùµÄ£¬³ýÁËchm¡¢pdf
Ī·ÇÊÇÒªÅijöÀ´µÄ¡£¡£¡£¡£=0= ÎÒ¾õµÃÕâÀàÊ黹ÊÇʵÌåÊé¿´µÄÓиоõ... ÈÃÎÒ¿´µç×ÓÊé¾õµÃ¾ ......
ÓÃjavascript¼ÓÔØÒ³ÃæʱָÏòÒ»¸öÃèµã¡£ÒÑÖªÈçºÎͨ¹ýÁ´½Ó×ö³ÉÃèµãµÄ£¬¿ÉÊÇÏëÈÃÒ³Ãæ¼ÓÔØʱֱ½ÓÖ¸Ïò²»ÐèÒªµã»÷Á´½Ó¡£
1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" &quo ......
Èý¸öÊýx,y,z ±È´óС..
var x,y,z,t;
if (x>y)
{t=x;x=y;y=t;} //½»»»x,yµÄÖµ
if(x>z)
{t=z;z=x;x=t;}//½»»»x,zµÄÖµ
if(y>z)
{t=y;y=z;z=t;}//½»»»z,yµÄÖµ
ÕâÊÇ ......