Unnamed
public text v1 · immutablefunction imgCheck(aForm) {
if ((aForm.bild.value.length == 0) ||
(aForm.bild.value == null)) {
return true;
}
else {
alert("nä.");
return false;
}
}
<form action="" method="post" enctype="multipart/form-data" onsubmit="imgCheck(this)">
<input type="file" name="bild" size="25" />
<input type="annat mög" />
<input type="submit" value="Lägg till" />
</form>