我在 Acrobat X pdf 表单中有 2 个互斥复选框。选中任一框需要隐藏一组文本字段。我已经为两个复选框分配了相同的 javascript,但只有在选中第一个框时才会隐藏这些字段。选中第二个框时没有任何反应。有任何想法吗?这是我使用的脚本(对javascript一无所知!):
var showHide = event.target.isBoxChecked(0) ? display.hidden : display.visible;
this.getField("Joint Address 1").display = showHide;
this.getField("Joint City 1").display = showHide;
this.getField("Joint State 1").display = showHide;
this.getField("Joint Zip/Postal Code 1").display = showHide;
this.getField("Joint Country 1").display = showHide;