PDA

View Full Version : مبتدی: form validation



IceBoomBoom
جمعه 10 تیر 1390, 00:45 صبح
<!--
function valbutton() {
// place any other field validations that you require here
// validate myradiobuttons
myOption = -1;
for (i=document.selectType.j.length-1; i > -1; i--) {
if (document.selectType.j[i].checked) {
myOption = i; i = -1;
}
}
if (myOption == -1) {
alert("You must select a radio button");
return false;
}

// place any other field validations that you require here
document.selectType.submit(); // this line submits the form after validation
}
-->

سلام !
این کد درست کار نمیکنه ! من اشکالی نمیبینم!:ناراحت: شما میتونین کمکم کنین:افسرده:

Arsess
جمعه 10 تیر 1390, 11:58 صبح
اینو امتحان کن
for (i=(document.selectType.j.length-1); i > -1; i--) {