开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜