為什么option中的onmouseover事件不起作用
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title> 光標(biāo)聚焦事件 </title>
? <script type="text/javascript">
??? function message(){
?? alert("請(qǐng)選擇,您現(xiàn)在的職業(yè)!");
?}
? </script>
</head>
<body>
請(qǐng)選擇您的職業(yè):<br>
? <form>
??? <select name="career" onfocus="message()">
????? <option>學(xué)生</option>
????? <option onmouseover="message()">教師</option>
????? <option>工程師</option>
????? <option>演員</option>
????? <option>會(huì)計(jì)</option>
??? </select>
? </form>
</body>
</html>
2017-02-14
你把onfocus()事件去掉就可以了