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

javascriptÖÐidºÍname - Web ¿ª·¢ / JavaScript

Ë­ÄܸøÎÒ½²Ò»ÏÂÔÚjavascriptÖÐidºÍnameÓÐʲôÑùÇø±ð£¿
Ò»¸öÒ³ÃæÖÐ id×îºÃÖ»ÓÐÒ»¸ö ÒòΪ javascript ÓÐ getElementById("id")Ö®ÀຯÊý
name ¿ÉÒÔÓжà¸ö ³£ÓÃÔÚÌá½»ÇëÇóÊ·þÎñÆ÷¶Ë»ñÈ¡

Ò»¸öÔªËØÖÐ×îºÃÉèÖà id Óë name Ãû×ÖÏàͬ



idÖظ´ÁË£¬ºÃÏñÕû¸öjavascript´úÂ붼ûÓÐ×÷ÓÃÁË

¶ÔÓÚ id Óà document.getElementById("nodeId"),ÇÒ id ²»ÄÜÖظ´£¬·µ»ØÒ»¸öΨһµÄÔªËØ£¬¶ø¶ÔÓÚ name ¿ÉÓà document.getElementsByName("sNodeName"), ·µ»ØÒ»¸öÔªËØÊý×é(¾ßÓÐÏàͬÃû×ÖµÄËùÓнڵã)£»


¹ËÃû˼Òå°É£º

name Ãû×Ö
id ±àºÅ£¨Éí·ÝÖ¤ºÅÂ룩

ͬһ¸ö°à¼¶£¬Í¬Ò»Ñ§Ð££¬¿ÉÒÔÓÐÈô¸É¸öͬÃû×Ö£¨name£©µÄÈË£»
µ«ÊÇÿ¸öÈË£¬¼´Ê¹ÐÕÃûÒ»Ñù£¬µ«ÊÇËûÃǵıàºÅ£¨id£©ÊDz»Ò»ÑùµÄ¡£

nameÖ÷ÒªÊǸøform(±íµ¥)ʹÓ㬶àÑ¡¿ò¡¢¸´Ñ¡¿ò¾Í»á¹«¹²Ò»¸öname£¬submitµÄʱºò¾Í»á°´name=valueµÄ¸ñʽÌá½»¸ø·þÎñÆ÷¡£
HTML code:
<input name="gender" type="radio" value="1" />ÄÐ<input name="gender" type="radio" value="2" />Å®


idÖ÷ÒªÊÇÓÃÀ´±íʾ±êÇ©µÄΨһÐÔ£¬name¿ÉÒÔ±íʾһÀ࣬ÔÚjsÖбíʾһÀà±êÇ©£¬Ï൱ÓÚjqueryÖеÄclass

ÒýÓÃ
idÖ÷ÒªÊÇÓÃÀ´±íʾ±êÇ©µÄΨһÐÔ£¬name¿ÉÒÔ±íʾһÀ࣬ÔÚjsÖбíʾһÀà±êÇ©£¬Ï൱ÓÚjqueryÖеÄclass
ooo

Õâ²»ÊÇjsµÄ¸ÅÄÊÇhtmlµÄ¸ÅÄî¡£nameÖ÷ÒªÓÃÓÚ±íµ¥ÔªËغͳ¬Á´½ÓÔªËØ£¬ËüºÃ±ÈÈ˵ÄÃû×Ö£¬ÖØÃûµÄ¶àÁËÈ¥Á


Ïà¹ØÎÊ´ð£º

Õâ¶ÎJavaScript´úÂëΪʲôÎÞ·¨Ö´ÐÐ - .NET¼¼Êõ / C#

ÒÔÏÂÊÇÒ»¶ÎJavsScript½Å±¾£¬µ«ÔËÐÐʱ×Ü»á²úÉú ¡°Microsoft JScript ÔËÐÐʱ´íÎó: 'null' Ϊ¿Õ»ò²»ÊǶÔÏó¡±Òì³££¬´ó¼Ò°ï¿´Ò»Ï¡£ 
<form id="form1" runat="server">
  < ......

ÇóÏÂÁª JavaºÍJavaScript - Java / ·Ç¼¼ÊõÇø

ÉÏÁª£ºJavaºÍJavaScript

×Ô¼ºÊÔÊÔ£º
ÏÂÁª£ºÃæ°üºÍÃæ°ü³µ

ÏÂÁª£ºSQLºÍMySQL
ºÇºÇ¡£

me and myself

ÏÂÁª£ºJavaScriptºÍJava

ÍÃ×ÓºÍÍÃ×Óʺ£¡
£¡

ÔÙÀ´Ò»¸ö£ºCºÍC++

ÒýÓÃ
ÏÂÁª£ºJavaScriptºÍJav ......

JavascriptÖÐÎļþ·¾¶µÄÎÊÌâ - Web ¿ª·¢ / Ajax

Îʸö±È½Ï»ù´¡µÄÎÊÌ⣬ÔÚÒ»¸öhtmlÎļþÖÐÒýÈëÁËÒ»¸ö.jsµÄÎļþ£¬ÄÇô¶ÔÓÚÕâ¸ö .js µÄÎļþÀ´Ëµ£¬ËüËù¶ÔÓ¦µÄµ±Ç°Â·¾¶Ó¦¸ÃÊÇÄÄÒ»¸ö£¿ÊÇhtmlÎļþËùÔڵķ¾¶£¬»¹ÊÇ .js ÎļþµÄ·¾¶£¿£¨htmlÓëjs²»ÔÚͬһÎļþ¼ÐÖУ©
ÓÉÓÚjsÖÐÒ ......

JavaScript´úÂëÔõôʵÏÖ£¿ - Web ¿ª·¢ / JavaScript

JavaScript´úÂëÔõôʵÏÖ£¿
 
Îļþ¼ÐÀïÃæºÜ¶àjpg¸ñʽµÄͼƬ ±ÈÈçcÅÌϵÄ22Îļþ¼Ð Ëæ»úÏÔʾһÕÅ ÔõôʵÏÖ ÎÒÊÇÐÂÊÖ Ï£ÍûÓгÌÐò



End_rbody_65127984//-->
¸Ã»Ø¸´ÓÚ2010-05-27 12:39:06±»°æÖ÷ɾ³ý
......

JavaScript´úÂëÔõôʵÏÖ£¿ - Web ¿ª·¢ / JavaScript

JavaScript´úÂëÔõôʵÏÖ£¿
Çë´ó¼Ò¿´Çå³þÒªÇó[size=12px][/size]
 
Îļþ¼ÐÀïÃæºÜ¶àjpg¸ñʽµÄͼƬ£¬±ÈÈçÓÐÎå°ÙÕÅ ·ÅÔÚcÅ̵ÄÃû×Ö½Ð22µÄÎļþ¼ÐÀïÃæ ÔõôËæ»úÏÔʾһÕŠϣÍûÓгÌÐò

Ö»ÓÃJavaScript´úÂ룬²» ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ