javascript有没有表单清空的函数?reset() <input type="button" name="reset" value="重置" onClick="if(window.confirm('注意:点击\“确认\”将清除您已输入的信息!')) {document.forms[signup_form].reset();return false;}"> 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <input type="button" name="reset" value="重置" onClick="if(window.confirm('注意:点击\“确认\”将清除您已输入的信息!')) {document.forms["signup_form"].reset();return false;}">可是浏览起报语法错误! document.forms["signup_form"].reset()改成form名字.reset() document.forms["signup_form"].reset()和signup_form.reset();一样的啊!大哥,我表单的名字就叫signup_form啊! <input type="button" name="reset" value="重置" onClick="if(window.confirm('注意:点击\“确认\”将清除您已输入的信息!')) {document.forms['signup_form'].reset();return false;}"> forms["signup_form"]forms[]不要直接写signup_form.reset() 把这段拿出来,写成函数,onclick调函数,不要直接写这么长的代码 大哥我写成signup_form.reset()啊?还是有错,我把onclick语句去掉就没有问题了!就是最后的return false有点不知是什么高深的用法? <input type="button" name="reset" value="重置" onClick="document.signup_form.reset();return false;">我都写成这样了!还是同样的错 onsubmit="if(confirm())document.forms[0].submit();" 我将</form>放在<input type="button" name="reset" value="重置" onClick="if(window.confirm('注意:点击\“确认\”将清除您已输入的信息!')) {document.forms['signup_form'].reset();return false;}">之前就好了,很奇怪,是不是document.forms['signup_form']这个对象要在</form>后才会生成??? <input type="button" name="reset" value="重置" onClick="if(window.confirm('注意:点击\“确认\”将清除您已输入的信息!')) {document.all['signup_form'].reset();return false;}"> 求解一正则表达式,只能匹配2位数字,不能匹配4为两位数字? 能不能态动创建的div插到</body>之前呢,高人帮助谢谢 JS给textarea赋值换行问题 正则表达式,怎么取一段html 问个js在for循环中递归的问题 中文字和数字的高度 请问,JavaScript 提不提供自定义的event?? 求按下按纽,就把<input type=text>的内容复制到剪贴板的代码? 这几个属性是干什么的? 如何在javascript中写中文字符串? 有没有人见过这种javascript的写法 求一个联动的JAVA菜单
可是浏览起报语法错误!
改成form名字.reset()
和signup_form.reset();一样的啊!
大哥,我表单的名字就叫signup_form啊!
forms[]不要
直接写signup_form.reset()
还是有错,我把onclick语句去掉就没有问题了!
就是最后的return false有点不知是什么高深的用法?
我都写成这样了!还是同样的错
<input type="button" name="reset" value="重置" onClick="if(window.confirm('注意:点击\“确认\”将清除您已输入的信息!')) {document.forms['signup_form'].reset();return false;}">
之前就好了,很奇怪,是不是document.forms['signup_form']这个对象要在</form>后才会生成???