var cb1 = this.getField("Check Box1").isBoxChecked(0);
var cb2 = this.getField("Check Box3").isBoxChecked(0);
var cb3 = this.getField("Check Box4").isBoxChecked(0);
var cb4 = this.getField("Check Box5").isBoxChecked(0);
var cb5 = this.getField("Check Box6").isBoxChecked(0);
var cb6 = this.getField("Check Box7").isBoxChecked(0);
var cb7 = this.getField("Check Box8").isBoxChecked(0);
if (cb1 && cb2 && cb3 && cb4 && cb5 && cb6 && cb7)
{ event.value = "0"; }
let totalDays = this.getField("Totaldays").value;
[
{checked: cb1, rentalRate: 0}, {checked: cb2, rentalRate: 30}, {checked:
cb3, rentalRate: 20}, {checked: cb4, rentalRate: 0}, {checked: cb5,
rentalRate: 40}, {checked: cb6, rentalRate: 0}, {checked: cb7, rentalRate:
0}
]
.filter(item => item.checked) .forEach(item => { let rentalFee =
item.rentalRate * totalDays; event.value += rentalFee; });
它一直表示存在“语法错误:语句前缺少;”。有人看到我显然想念的东西吗?我觉得我需要新鲜的眼睛才能看到它。我正在使用Adobe Acrobat DC fyi。在图像中,我绘制了一个箭头以突出显示并提及该箭头。预先谢谢你!
答案 0 :(得分:0)
请注意,目前Adobe Acrobat DC seems to use javascript version 1.5(ECMA-262第三版)尚未实现您使用的功能。
您应该首先尝试替换箭头功能(在ECMA-262第6版中引入):
BASE <http://data.example.com/>
PREFIX : <http://example.com/>
PREFIX iter: <http://w3id.org/sparql-generate/iter/>
PREFIX fun: <http://w3id.org/sparql-generate/fn/>
GENERATE {
<{?col1}> :anotherProperty ?col3.
GENERATE{
<{?col1}> :aProperty <{ ?value }> ;
}
ITERATOR iter:Split( ?col2 , " " ) AS ?value .
}
ITERATOR iter:CSVStream("http://example.com/file.csv", 20, "*") AS ?col1 ?col2 ?col3