方法一:用text代替hidden,设置text隐藏
<input id="id" name="id" style="display: none;" value="0" />
方法二:单独处理hidden类型
jQuery("#saveForm").form("reset");
jQuery("input[type='hidden']").val("");
方法三:使用clear代替reset
jQuery("#saveForm").form("clear");
注意: clear之后表单的radio也被情况,html的checked也不能生效了,要js重新给radio设置选中值;
本文标题:表单reset无法重置hidden的解决方案
本文链接:https://blog.quwenai.cn/post/5416.html
版权声明:本文不使用任何协议授权,您可以任何形式自由转载或使用。






还没有评论,来说两句吧...