事件学习 输入框的获取焦点和失去焦点的颜色变化

原创2019-03-03 15:24:3478
摘要:<!DOCTYPE html> <html> <head> <title>事件学习</title> </head> <body> <script type="text/javascript"> function myfocus(a){ a.style
<!DOCTYPE html>
<html>
<head>
	<title>事件学习</title>
</head>
<body>
<script type="text/javascript">
function myfocus(a){
	a.style.background="red"
}
function myblur(a){
	a.style.background="blue"
}

</script>
您的姓名:<input type="text"  onfocus="myfocus(this)" onblur="myblur(this)">
</body>
</html>


批改老师:西门大官人批改时间:2019-03-03 16:22:19
老师总结:作业写的很好。在js代码中,最好在每行加上";",规范一些

发布手记

热门词条