开发者

How can we perform reset function in master page of aspx page?

开发者 https://www.devze.com 2022-12-13 11:16 出处:网络
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.
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 functi开发者_JS百科on of reset which I used for resetting.


Javascript is case-sensitive. Is it possible that you have your form name wrong? Try to use an index instead...

document.forms[0].reset();

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消