javascript Adob​​e表单复制文本从字段与梳子

时间:2016-12-06 03:37:16

标签: javascript forms adobe

我想在选择" As Above"上时,将文字从邮政编码的字段复制到另一个邮政编码字段。复选框,目前它复制地址字段,而不是邮政编码。该字段使用COMB选项将输入分散到4个框中,我想这就是为什么我当前的脚本不能在这个字段上工作,我正在使用的脚本是

  //Set the source and destination vars:
      var source = this.getField("Tradingaddress");
      var destination = this.getField("Mailingaddress");

  //See if destination is empty and if so, insert source value
      if(destination.value==''||destination.value==null) {destination.value=source.value}

任何帮助表示赞赏!

1 个答案:

答案 0 :(得分:0)

好吧所以我使用了与上面相同的脚本,但在添加自定义脚本之前,我更改了字段,因此它没有梳子,只是一个标准字段,添加了脚本并且工作了,然后去了回到两个字段的属性并重新添加梳子功能并重新测试OK!〜:)感谢您的帮助ME哈哈