如何在aspx页面的母版页中执行重置功能?
function reset1()
{
alert("123");
document.form1.reset();
return false();
}
我想使用 Javascript 重置母版页的控件,但它无法正常工作。 任何人都可以帮助我完成它的工作吗?
以上是我用来重置的reset函数。
function reset1()
{
alert("123");
document.form1.reset();
return false();
}
I want to have resetting controls of a master page using Javascript, but it doesn't work properly.
Can anyone help me to get through to it working?
Above is the function of reset which I used for resetting.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
JavaScript 区分大小写。您的表单名称可能有误吗?尝试使用索引...
或者您可能不确定
reset
应该做什么。它将表单上的每个元素恢复为其默认值。它应该完全执行的操作。
Javascript is case-sensitive. Is it possible that you have your form name wrong? Try to use an index instead...
Or perhaps you are not sure what
reset
is supposed to do. It restores each element on the form to its default value. It should do exactly what a<input type="reset"/>
would do.