动态生成的控件,如何获取它的值?
dapha 2003-08-04 03:09:36 <script language="javascript">
function setfilename()
{
str='<br>';
if(!window.form1.filecount.value)
window.form1.filecount.value=1;
for(i=1;i<=window.form1.filecount.value;i++)
str+='文件'+i+':<input type="text" name="filename'+i+'" style="width:400" class="flat"><br><br>';
window.sendall.innerHTML=str+'<br>';
}
</script>
filecount=是一个文本输入框
sendall=<td id="sendall">
在本页中如何使用javascript得到某个filename的值?
我用filename.length来循一环,提示错误说对象不存在?.
帮帮忙,谢谢