ITeye博客

form表单提交的问题

hthjava · 2009-06-25 09:32 · html · Markdown

今天在页面上提交一个form表单,是这样写的

<html>
	<head>
		<script type="text/javascript">
			function a(){
				alert("access");
				document.test.submit();
			}
		</script>
	</head>

	<body>
		<form name="test" action="bbb.html" method="post">
			<input type="button" name="submit" onClick="a();" value="提交"/>
		</form>
	</body>
</html>

一提交就报js错误,说document.test.submit()不是函数,奇怪了,到网上查了下,原来这个地方的name不能为submit,随便换一个好了,猜想submit可能被html内置了,所以冲突,处错误

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。