Tip: you can modify some code before running
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>New document</title> <meta name="generator" content="editplus" /> <meta name="author" content="" /> <meta name="keywords" content="" /> <meta name="description" content="" /> </head> <body> <select id="y" name="y"><option value="">Year</option><option value="1982">1982</option><option value="1983">1983</option><option value="...">...</option> </select> <select id="m" name="m"><option value="">Month</option><option value="1">1</option><option value="2">2</option><option value="...">...</option> </select> <select id="d" name="d"><option value="">Day</option><option value="1">1</option><option value="2">2</option><option value="...">...</option> </select> <input type="button" value="提交" onclick="javascript:check();" /> <script type="text/javascript"> <!--function check(){var y,m,d;var o_y = document.getElementById('y');var o_m = document.getElementById('m');var o_d = document.getElementById('d');y = o_y.options[o_y.selectedIndex].value;m = o_m.options[o_m.selectedIndex].value;d = o_d.options[o_d.selectedIndex].value;if(y=='' || m=='' || d=='')alert('没选完');elsealert('选完了');} //--> </script> </body></html>
Tip: you can modify some code before running