高手,帮我忙!!!!!!!!!!
程序代码:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www. New Document </title> <meta name="Generator" content="EditPlus"> <meta name="Author" content=""> <meta name="Keywords" content=""> <meta name="Description" content=""> </head> <script language="javascript"> <!-- function RS() { var sel = HQ("cbx"); if(sel == 0) { alert("你没有做出任何选择,请选择后再提交"); return false; } else { txt="你喜欢的水果有:"+sel; alert(txt); } } function HQ(objname) { var s; var obj = new Array(); obj = document.getElementsByName(objname); if(obj.checked) { s=obj.value; } return(s); } --> </script> <body> <form> <input type="checkbox" name="cbx" value="苹果">苹果 <input type="submit" value="提交" onclick="RS();"> </form> </body> </html> 问题:我要输出苹果,看看我这代码那里错了。