0
我打電話時,焦點在表單域上的JavaScript函數。所以我要做的是,如果我打勾要求這個字段作爲必填字段,它將有一個紅色的邊框,我可以編寫一個腳本來刪除所需的選項時,有價值的領域內?adobe acrobat XI pro javascript
var thisValue = this.getField("companyName").value;
var regexLetter = /[A-Z]+$/;
var Icon = "0"; //0 — Error (default) // 1 — Warning // 2 — Question // 3 — Status
var Type = "0"; //0 — OK (default) // 1 — OK, Cancel // 2 — Yes, No // 3 — Yes, No, Cancel
if (thisValue == ""){
app.alert({
cMsg:"this is an warning",
cTitle: "thsi is title",
nIcon: Icon,
nType: Type
})
} else if(!regexLetter.test(thisValue)){
app.alert('Type alphanumeric character');
}