0
文本框的数目不详
我已经定义文本字段如下:验证使用JavaScript
<form name="form1" method="post" action="save_banners.php" onsubmit="return check_form();">
<input type=text name=banner[]>
<input type=text name=banner[]>
<input type=text name=banner[]>
<input type=text name=banner[]>
<input type=submit value="submit">
<script>
function check_form(){
alert (document.form1.banner[0].value);
}
</script>
如何使用在JavaScript这些领域?我正在使用上面的JavaScript代码,但它不起作用。
问候,
谢谢你,它的工作。 –