HTML的input类型为hidden导致无法reset改字段的value问题

问题关键:根据HTML规范,hidden是非ui类元素,不接受用户处理。所以form的 reset并不影响它。

http://stackoverflow.com/questions/6367793/why-does-the-reset-button-on-html-forms-not-reset-hidden-fields

解决思路:既然是非ui的,就避开用它,用text但是隐藏起来。

http://stackoverflow.com/questions/2559616/javascript-true-form-reset-for-hidden-fields

国内的解决方案:

http://blog.csdn.net/woxueliuyun/article/details/7633823

posted @ 2017-02-20 11:24  任国强  阅读(2019)  评论(0编辑  收藏  举报