如果用户在组合列表中选择一个空格,我正在尝试发出警报,但是我在每次选择时都会得到错误窗口而不仅仅是我的var a。我是关于编程acrobat JavaScript的新手,感谢您的关注。
这是我的剧本:
var Brand = this.getField("BrandList");
event.value = Brand.value;
if (event.value!="B000")
{
var a=(Brand = "B000");
var b=(Brand= ["B010"],["B020"],["B030"],["B040"],["B050"],["B051"],["B051"],["B052"],["B053"],["B054"],["B055"],["B060"],["B061"],["B062"],["B063"],["B064"],["B065"],["B070"]);
if (a=true) {
event.target = null;
event.rc= null;
event.action= null;
event.change= "Brand";
app.alert({
cMsg: "The selection is not valid",
cTitle: "Data Error",
nIcon: 0,
nType: 1
});
}
if (b=true) {
event.target = true;
event.rc= true;
event.action= true;}
}