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

ѧÁ˺ü¸ÌìµÄJavaScriptÓöµ½Õâô¸öÎÊÌ⣬Çó´ïÈ˽â

HTML code:

<html>
<head>
<script language="javascript" type="text/javascript">
alert(document.getElementById("member").options.length)
</script>
</head>
<body>
<select id="member">
<option value="1"></option>
</select>
</body>
</html>


´úÂ뱨´íalertÄÇÒ»¾äȱÉÙ¶ÔÏóÊÇΪʲô°¡£¿
<script language="javascript"  type="text/javascript">
alert(document.getElementById("member").options.length) 
//ÔÚ½âÎöÉÏÃæÕâÐдúÂëʱmemberµÄÔªËØ»¹ÓмÓÔØ½øÀ´
</script>



<html>
<head>
<script type="text/javascript">
function test()
{
alert(document.getElementById("member").length);
}

</script>
</head>

<body>
<select id="member">
<option>123 </option>
</select>

<input type="submit" onclick="test()" value="show" />

</body>
</html>

ÊÔÊÔ

window.onload = function(){alert(document.getElementById("member").options.length);}

ѧϰÁ


Ïà¹ØÎÊ´ð£º

javaScript ÐüÍ£¸¡¶¯²ã¶¨Î»

ÈçºÎʵÏÖµ±Êó±êÐüÍ£¿Ø¼þÉÏʱ£¬³öÏָÿؼþµÄβ²¿ÏÔʾ¶ÔÓ¦µÄ²ã£¬Êó±êÒÆ¶¯µ½¸Ã²ãÉϽøÐÐÏàÓ¦µÄ²Ù×÷£¬µ±Êó±êÒÆ³ýʱ£¨²»ÔڿؼþÉÏÒ²²»ÔÚ²ãÉÏ£©²ãÒþ²Ø£¬

http://topic.csdn.net/u/20090830/23/5e5ded07-7216-46c2-9712- ......

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

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

ASP .NETºǫ́Îļþдjavascript´úÂë

ÎÒÓÐÒ»¶Îjavascript´úÂ룬ԭ±¾Ð´ÔÚasp .netÒ³ÃæÀÎÒÏë°ÑËüдÈëasp .netºǫ́´úÂëÖС£ÇëÎÊÒªÔõôд£¿Ð»Ð»£¡
Ò²¾ÍÊÇ˵´ÓaspxÎļþÖУ¬¸ÃΪдÈëaspx.csÖУ¬Çë¸øÊµÀý˵Ã÷¡£

寫ÁËÖ®ááÄã×öʲ麼²Ù×÷£¿

......

¹ØÓÚJavaScriptµÄprototypeºÍinstanceof

JScript code:

function C1(){}
function C2(){}
C2.prototype=new C1();
function C3(){}
C3.prototype=new C2();
var obj=new C3();
function C4(){}
C3.prototype=new C4();
alert(obj insta ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ