【发布时间】:2020-06-18 02:34:18
【问题描述】:
我创建了一个带有页面模板的表单,当用户选择表单上的复选框时会生成这些模板。 其中一个页面模板有一个复选框列表,后跟“全选”复选框。选中此项后,所有复选框都会自动选中。 这在页面模板上工作正常,但是当生成模板时,“全选”复选框之间的“链接”被破坏,并且没有选择其他复选框。 这是我目前拥有的 javascript:
if(event.target.isBoxChecked(0))
{// Perform actions when checked
this.getField(“A”).checkThisBox(0,true);
this.getField(“B”).checkThisBox(0,true);
this.getField(“C”).checkThisBox(0,true);
this.getField(“D”).checkThisBox(0,true);
this.getField(“E”).checkThisBox(0,true);
this.getField(“F”).checkThisBox(0,true);
this.getField(“G”).checkThisBox(0,true);
}
else
{// Perform actions when unchecked
this.getField(“A”).checkThisBox(0,false);
this.getField(“B”).checkThisBox(0,false);
this.getField(“C”).checkThisBox(0,false);
this.getField(“D”).checkThisBox(0,false);
this.getField(“E”).checkThisBox(0,false);
this.getField(“F”).checkThisBox(0,false);
this.getField(“G”).checkThisBox(0,false);
}
【问题讨论】:
标签: javascript forms templates pdf checkbox