Linux -Blue forest free software | Return to home page | Site Map | Search WWW | Contact Us |
Your current position : Homepage > Free Software > Technological exchanges >Application Programming


    

Blue Forest http://www.lslnet.com at 6:28 p.m. on August 22, 2006

Javascript complex Xuankuang how to judge the election?

If the problem? ? ? Javascript complex Xuankuang how to judge the election?

!obj.checked

Myhyli said in a message

What is this? How?

[html]
"Input type=radio name=test onclick=" alert (checked), ""
[/html]

[html]
"SCRIPT LANGUAGE=" JavaScript ""
Function test (form) (
Var = false checkit
For (var i=0;i<form.s.length;i++) (
If (form.s[i].checked) {checkit=true;break}
        }
If (checkit) {return true} else {alert ( "error : no choice! ") ;return False}
}
"/script>
"Form name="_ftn1"" FORM "method=" POST "action=" "onSubmit=" return test (this), ""
"Input type=" radio "name="_ftn1"" s "value=" CyA "" 11111<input type= "radio" value= "nodes" name="_ftn1" "s" "22222<br>
"Input type=" submit "value=" see results "name="_ftn1"" B1 ""
"/form>
[/html]

Landlord is complicated Xuankuang miles

[html]
"SCRIPT LANGUAGE=" JavaScript ""
Function check (obj) (
With (obj) (
Var flag=false;
For (i=0;i<obj.length;i++) (
Obj[i].type== "checkbox"? (Obj[i].checked?flag=true : '') : '';
}
If (!flag)
Alert ( "no election");
}
}
"/SCRIPT>
"FORM METHOD=" POST ""
"INPUT TYPE=" checkbox "," 1
"INPUT TYPE=" checkbox "" 2
"INPUT TYPE=" checkbox "," 3
"INPUT TYPE=" checkbox "" 4
"INPUT TYPE=" checkbox "" 5
"INPUT TYPE=" button "value=" click "onclick=" check (this.form), ""
"/FORM>
[/html]




 Privacy Policy  Copyright © 1999-2000 LSLNET.COM. All rights reserved. Blue Forest website owners. E-mail : Webmaster@lslnet.com