-
IT café
JavaScript != Java (A JavaScript nem összekeverendő a Javával, két különböző programozási nyelvről van szó!)
Új hozzászólás Aktív témák
-
Taci
addikt
Google-ben van egy ilyen találat a saját topikjában: [link]
var emptyFields = [];
for (var i=0; i<this.numFields; i++) {
var f= this.getField(this.getNthFieldName(i));
if (f.type!="button" && f.required ) {
if ((f.type=="text" && f.value=="") ||
(f.type=="checkbox" && f.value=="Off"))
emptyFields.push(f.name);
}
}
if (emptyFields.length>0) {
app.alert("Error! You must fill in the following fields:\n" +
emptyFields.join("\n"));
}
For anyone else who is trying to implement this heres how:
Create a button
Right click the button and go to properties -> Actions tab
Trigger:Mouse Up
Action: Run JavaScript
-> Add...
Copy and paste Giliad D's code
->ok -> close
Select the fields you want required by right clicking the fields and selecting the "Set as Required Field" option
Save and done!De találtam egy videókat is: [link] [link]
Ilyesmi keresésekkel (Google-ön és YouTube-on is) még sok más találatot is kapsz:
adobe reader dc pdf check if field is empty javascript
adobe reader dc pdf form validationRemélem, így már meglesz.
[ Szerkesztve ]
Új hozzászólás Aktív témák
- Acer Aspire 7 A715-73G-565S vadiúj akkumulátor
- GENIUS vezetéknélküli, rózsaszín csajos egér
- iPhones 6S 64GB független GOLD / arany
- Bomba ár! Dell Latitude E6440 - i5-4GEN I 8GB I 500GB I 14" HD I HDMI I W10 I Garancia!
- Bomba ár! Lenovo ThinkPad T460 - i5-6GEN I 8GB I 500GB I 14" HD I Cam I W10 I Garancia!