Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

HTML+Javascript+XML


ÉÏÃæËù˵ÓйØHTMLµÄÄÚÈݷdz£ÉÙÓÖ¼òµ¥,µ«¶ÔÒѾ­Á˽âµÄÈËÀ´Ëµ¾ÍÊÇûÓõÄ.
ÈçÓÐÎÊÌâ¿Éµ½È¨ÍþÍø http://www.html.com/ Éϲ鿴
ÒÔÏ¿ªÊ¼ËµËµ¹ØÓÚXMLµÄһЩ֪ʶ.
XMLÒ²ÊDZê¼ÇÓïÑÔ,¿ÉËüÊÇ×Ô¶¨ÒåµÄ,ûÓÐÒѸø¶¨¸ñʽ.²»¾ßÌå˵Ëü,¸ø³öÀý×ӾͿÉÃ÷ÁË.
Èç
<NAME>TOM</NAME>
<SEX>M</SEX>
ÒÔÉÏÄÚÈݵÄ<NAME>ºÍ<SEX>ûÓÐÏñHTMLµÄ<P>»ò<BR>µÈÄÇÑùÓй̶¨ÏÔʾ¸ñʽ,Äã¿ÉÒÔÓÃÄãϲ»¶µÄ´ÊÀ´±ê¼Ç,Èç<ÐÕÃû><ÐÔ±ð>µÈµÈ.(×¢Òâ:XMLÊÇÇø·Ö´óСд)ÖÁÓÚÈçºÎʹXMLÎĵµ¸ñʽ»¯Êä³ö,ÏÞÓÚƪ·ù,²»Ì¸.
ÏÂÃæ×öÒ»¸öͨѶ¼µÄXMLÊý¾ÝÎĵµ
<?xml version=\"1.0\" encoding=\"gb2312\"?>
<ͨѶ¼>
<ÁªÏµÈË>
<ÐÕÃû>ÕÅÈý</ÐÕÃû>
<ÐÔ±ð>ÄÐ</ÐÔ±ð>
<סַ>±±¾©</סַ>
<µç»°ºÅÂë>123456789</µç»°ºÅÂë>
</ÁªÏµÈË>
<ÁªÏµÈË>
<ÐÕÃû>ÀîËÄ</ÐÕÃû>
<ÐÔ±ð>Å®</ÐÔ±ð>
<סַ>¹ãÖÝ</סַ>
<µç»°ºÅÂë>8587288</µç»°ºÅÂë>
</ÁªÏµÈË>
<ÁªÏµÈË>
<ÐÕÃû>ÍõÎå</ÐÕÃû>
<ÐÔ±ð>ÄÐ</ÐÔ±ð>
<סַ>ÉϺ£</סַ>
<µç»°ºÅÂë>0745-522555</µç»°ºÅÂë>
</ÁªÏµÈË>
</ͨѶ¼>
ÉÏÃæÖ»ÒÔÈýÈËΪÀý,¿ÉÒÔ×ÔÐмÓÈëÆäËüÈË
<?xml version=\"1.0\" encoding=\"gb2312\"?>//ÕâÊÇÍ·²¿±ØÐèµÄÉùÃ÷,ÆäÖÐversion=\"1.0\"ÊÇ°æ±¾ÉùÃ÷,ÏÖÔÚ¶¼ÊÇ1.0 encoding=\"gb2312\"ÊÇÖ¸¶¨ÎªÖÐÎĵÄgb2312±àÂë.
×¢Òâ·Ç³£ÑϸñµÄ¸ñʽҪÇó,¿Õ¸ñÒ²²»ÄÜÓжàÓÐÉÙ
±£´æΪ*.XMLÎĵµ,ÓÃIEä¯ÀÀÆ÷´ò¿ª¿ÉÒÔ¿´µ½ÊÇÒ»¸öÓнڵãµÄÊ÷Ðͽṹ
<ͨѶ¼></ͨѶ¼>°üº¬ÁËÈ«²¿µÄÔªËØ,ËùÒÔËüÊǸùÔªËØ,ÊÇΨһµÄ±ØÐëµÄ.
ÆäËüÔªËض¼±ØÐë°üº¬ÔÚËüµÄÀïÃæ,Èç<ÐÔ±ð>µÈ.
XMLÊý¾ÝÎĵµÒѾ­×¼±¸ºÃÁË.ÏÈÀ´×öÒ»¸ö¼òµ¥µÄ±íµ¥
<html>
<head>
<title>
ÎÒµÄͨѶ¼
</title>
</head>
<body>
<form name=\"form1\">
ÇëÊäÈë²éѯÈ˵ÄÐÕÃû
<input type=\"text\" name=\"text1\">
<input type=\"button\" name=\"button1\" value=\"²éѯ\">
</form>
</body>
</html>
»ù±¾ÉÏÕâÑù¾Í×öºÃÁËÒ»¸ö¿ò¼Ü,¾ßÌåʵÏÖÒªÓÃjavascriptÀ´´¦Àí¶¯×÷,ʵÏÖ²éѯ.
(ÈçÏëÁ˽âXML¼¼Êõ,¿Éµ½ http://www.xml.com


Ïà¹ØÎĵµ£º

TEXTAREA ×Ö½ÚÏÞÖÆ(javascript£¬struts µÄÒ³Ãæ±êÇ©)

//Textarea maxlength
//flag:text¿òÃû×Ö£¬num:ÏÞÖƵÄ×Ö½ÚÊý
  function maxLen(flag,num){
  if(document.getElementById('lastMessage').value=="0" || document.getElementById('lastMessage').value==flag){
    var i=document.getElementById(flag).value.replace(/[\u0 ......

javascript cookies ´æ¡¢È¡¡¢É¾³ýʵÀý

<script>
//дcookiesº¯Êý ×÷ÕߣºµÔÕñ¿­
function SetCookie(name,value)//Á½¸ö²ÎÊý£¬Ò»¸öÊÇcookieµÄÃû×Ó£¬Ò»¸öÊÇÖµ
{
    var Days = 30; //´Ë cookie ½«±»±£´æ 30 Ìì
    var exp  = new Date();    //new Date("December 31, 9998");
    ......

ÉîÈëÀí½âJavaScript±Õ°ü£¨closure£©

×î½üÔÚÍøÉϲéÔÄÁ˲»ÉÙJavascript±Õ°ü(closure)Ïà¹ØµÄ×ÊÁÏ£¬Ð´µÄ´ó¶àÊǷdz£µÄѧÊõºÍרҵ¡£¶ÔÓÚ³õѧÕßÀ´Ëµ±ð˵Àí½â±Õ°üÁË£¬¾ÍÁ¬ÎÄ×ÖÐðÊö¶¼ºÜÄÑ¿´¶®¡£×«Ð´´ËÎĵÄÄ¿µÄ¾ÍÊÇÓÃ×îͨË×µÄÎÄ×Ö½Ò¿ªJavascript±Õ°üµÄÕæʵÃæÄ¿¡£
Ò»¡¢Ê²Ã´ÊDZհü£¿
“¹Ù·½”µÄ½âÊÍÊÇ£ºËùν“±Õ°ü”£¬Ö¸µÄÊÇÒ»¸öÓµÓÐÐí¶à±äÁ¿ºÍ°ó¶¨Á ......

Javascript ±Õ°ü


·­Ò룺Ϊ֮Âþ±Ê
Á´½Ó£ºhttp://www.cn-cuckoo.com/2007/08/01/understand-javascript-closures-72.html
¼ò½é
»ùÓÚ¶ÔÏóµÄÊôÐÔÃû½âÎö
ÖµµÄÖ¸¶¨
ÖµµÄ¶ÁÈ¡
±êʶ·û½âÎö¡¢Ö´Ðл·¾³ºÍ×÷ÓÃÓòÁ´
Ö´Ðл·¾³
×÷ÓÃÓòÁ´Óë [[scope]]
±êʶ·û½âÎö
±Õ°ü
×Ô¶¯À¬»øÊÕ¼¯
¹¹³É±Õ°ü
ͨ¹ý±Õ°ü¿ÉÒÔ×öʲô£¿
Àý 1£ºÎªº¯Êý ......

javascript»ñÈ¡·þÎñ¶Ë¿Ø¼þÖµµÄÁ½ÖÖ°ì·¨

µÚÒ»ÖÖ:
+Õ¹¿ª
-HTML
<html> 
<head> 
</head> 
<body> 
<form name="form1"> 
<input type="text" name="getinfo" value="http://www.shuwo.net" size="40"><button onclick="alert(document.form1.getinfo.value ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ