首页 > 解决方案 > Adobe Acrobat 取消选中复选框 javascript 功能不起作用

问题描述

我正在尝试根据复选框值选中或取消选中特定的复选框。当我选中该框时,其他框将被选中,但如果我取消选中该框,则其他框不会被取消选中。我尝试了鼠标退出和鼠标向上触发器,结果相同。

if (this.getField("Check Box2").value == "On")
{
this.getField("Check if this is an").value = "On";
this.getField("Check 1").value = "On";
this.getField("Check Box230").value = "Yes";
}
else //if (this.getField("Check Box2").value == "Off")
{
//this.getField("Check if this is an").value = "Off";
this.getField("Check if this is an").checkThisBox(0, false)
this.getField("Check 1").value = "Off";
this.getField("Check Box230").value = "Off";
}

我已经尝试了 2 个if语句,以及 anif/else以及 the.value = "Off"checkThisBox(0, false)方法。当我使用控制台中的任何一种方法运行单行时,它都可以工作。

标签: javascriptpdfcheckboxadobeacrobat

解决方案


我更改了字段名称,现在它可以工作了。


推荐阅读