在pageload上恢复复选框 [英] Recover checkboxes on pageload

查看:76
本文介绍了在pageload上恢复复选框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

据我所知,有几种方法可以保存复选框信息。最适合此应用程序的方法是在divID上验证,但函数仍然无效。

< span class =codeLinkonclick =Blur(this,this.parentNode.parentNode,getChildren(this),true);>展开 | 选择 | Wrap | 行号

解决方案
"过滤"应该在引号中。


我设法让URL中的字段显示onsubmit上的正确值,并且视图源也是正确的。但是复选框本身仍然是空的。

展开 | 选择 | Wrap | 行号


已过滤的是复选框的名称,所以,如果你试图从那里获取输入元素,你就不会得到任何东西。查找复选框的父元素容器,然后使用getElementsByTagName。


I understand there are several ways to save checkbox information. The way that best fits this application is validating on the divID but the function is still not working.

Expand|Select|Wrap|Line Numbers

解决方案

"Filtered" should be in quotes.


I managed to get the field in the URL showing the correct value onsubmit and the view source is correct as well. But the checkbox itself remains empty.


Expand|Select|Wrap|Line Numbers


Filtered is the name of the checkbox, so if you try to get the input elements from there, you won''t get anything. Look for the parent element container for the checkbox and then use getElementsByTagName.


这篇关于在pageload上恢复复选框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆