光標聚焦事件--為什么點擊方框沒有提示出現
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title> 光標聚焦事件 </title>
? <script type="text/javascript">
? ? function message(){
?alert("請選擇,您現在的職業!");
}
? </script>
</head>
<body>
請選擇您的職業:<br>
? <form><onfocus="message()">
? ? <select name="career">?
? ? ? <option>學生</option>?
? ? ? <option>教師</option>?
? ? ? <option>工程師</option>?
? ? ? <option>演員</option>?
? ? ? <option>會計</option>?
? ? </select>?
? </form>
</body>
</html>
2016-04-14
<form><onfocus="message()"> ?修改為 ?方案一:<form onfocus="message()">?
方案二:????<from><select name="career" onfocus="message()">
2016-04-14
?<form>
? ? <select name="career" ?onfocus="message()"> ??
? ? ? <option>學生</option>?
? ? ? <option>教師</option>?
? ? ? <option>工程師</option>?
? ? ? <option>演員</option>?
? ? ? <option>會計</option>?
? ? </select>?
? </form>
?
onfocus="message()"放入select標簽中
2016-04-14
你需要把?onfocus="message()"放入select標簽中 你那樣寫的話并沒有針對這個標簽實現功能