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

Ôõô»ñÈ¡javascriptÖÐinput±êÇ©×ÜÊý

function add()
{
  var div1=document.getElementById("filelist");
   
    var  filea=document.createElement("input");
  filea.setAttribute("type","file");
  filea.setAttribute("size","40");
  filea.setAttribute("name","file5");
  filea.setAttribute("class","aa");
}
<input type='button' value="Ôö¼Ó" onclick="add()">
µ±Óû§µã»÷Ôö¼Ó°´Å¥Ê± ´´½¨inputÔªËس¬¹ý5¸öʱ alert()ÏÂ

×¢Òâ: ÎÒÒ³ÃæÖмº¾­ÓÐÒ»¸öinput±êÇ©ÔªËØ
document.getElementByTagname("input")
???

ÓÃjquery×î·½±ã

var x=document.getElementsByTagName("input");
  alert(x.length);


function getElements()
  {
  var x=document.getElementsByTagName("input");
  alert(x.length);
  }

ÖÁÓÚÓжàÉÙ¸öinput,Äã×Ô¼ºÅжϰÉ

jq: $("input").size();

document.getElementsByTagName("input");

var inputs=document.getElementsByTagName("input");
var len=inputs.length

¸úÌû

$("input").size(); jqueryÖÐʵÏÖ

JScript code



Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/



Ïà¹ØÎÊ´ð£º

¶à¸öJavaScriptµÄÑéÖ¤ÎÊÌâ

Ç°Óжà¸öJavaScriptº¯Êý 
ºóÃæÌá½»¿É <form name="" action="" method="" onsubmit="return isPostalCode();return isID();return isEmail() "

¿ÉÕâÑùÐ ......

javascriptµÄÊý×éÎÊÌâ

ÎÒÏë¼Ç¼ÏÂÎÒÑ¡ÖеÄcheckboxµÄÖµ.ÇëÎÊÎÒÓ¦¸ÃÔõô°ìÁÐ?
ÏÂÃæÊÇÎҵĴúÂë,asddÊÇ´«½øÀ´µÄcheckboxµÄÃû×Ö.Õâ¸öûÎÊÌâ,Ö÷ÒªÊÇusidËƺõ²»Äܱ£´æס.ÎÒ¿´IE8µÄµ÷ÊÔÖÐUSIDÊÇÉùÃ÷³öÀ´ÁË.¿ÉÊÇËƺõûÓдóС.ÊÇundefinedµÄ.Ìí¼ ......

ÇóÒ»¸öJAVAscript(¸ã¶¨½á)

Ò»¸öform±íµ¥ÀïÃæÓкܶàcheckbox
ĬÈÏÊÇÈ«²¿Ñ¡ÖÐ
ÔõôʵÏÖµ±ÎÒֻѡһ²¿·ÝʱÔÚÌύʱ »¹ÊÇÎÒÑ¡µÄÄDz¿·Ý£¨ÒòΪÌá½»ÊDZ¾Ò³Ãæ Ö»ÒªÒ»Ìá½»Ëû¾Í ĬÈÏÊÇÈ«²¿Ñ¡ÖУ©
  Ìá½»µ½±¾Ò³Ãæºó£¬»ñµÃÑ¡ÖеÄÖµ£¬°Ñ¸ÃÖµ·Å ......

vs2008ÖÐjavascriptÖÇÄÜÌáʾÏûʧ

ÈçÌ⣬¸øµã½¨Òé¡£
°Ù¶ÈÉÏËѵķ½·¨£¬ÊÔ¹ýÁË£¬Ã»Óá£
ûÓöµ½¹ý£¬¹À¼ÆÄĸö×é¼þÎÞ·¨ÔËÐÐÁË£¬ÖØ×°°É¡£

ÐÞ¸´Ò»Ï°É

°²×°sp1ºÍ²¹¶¡
½« <script src="jquery-1.3.2.js" type="text/javascri ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ