<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title> 光标聚焦事件 </title>
<script type="text/javascript">
function message(){
alert("请选择,您现在的职业!");
},
function message1(){
var new2=document.getElementById("new1");
new2.style.backgroundColor="pink";
}
</script>
</head>
<body>
<form>
<input onmouseover="message()" value="请选择您的职业:">
<select name="career" id="new1" onfocus="message1()">
<option>学生</option>
<option>教师</option>
<option>工程师</option>
<option>演员</option>
<option>会计</option>
</select>
</form>
</body>
</html>
huangzhong
相关分类