您好,欢迎来到外链网!
当前位置:外链网 » 站长资讯 » 专业问答 » 文章详细 订阅RssFeed

html5表单重置按钮,jquery表单重置方法

来源:互联网 浏览:42次 时间:2023-04-08

<html>
<head>
<script type="text/javascript">
function formReset()
{
document.getElementById("myForm").reset()
}
</script>
</head>

<body>
<p>在下面的文本框中输入一些文本,然后点击重置按钮就可以重置表单。</p>

<form id="myForm">
姓名:<input type="text" size="20"><br />
年龄:<input type="text" size="20"><br />
<br />
<input type="button" οnclick="formReset()" value="重置">
</form>
</body>
</html>

地址连接:http://www.w3school.com.cn/tiy/t.asp?f=hdom_form_reset

转载于:https://www.cnblogs.com/Ann-wxp/p/3981542.html

27087421