第一个事件效果

Original 2019-04-22 14:36:48 190
abstract:<!DOCTYPE html> <html> <head> <title></title> <!-- <script type="text/javascript" src="index.js"></script> 
<!DOCTYPE html>
<html>
<head>
	<title></title>

	<!-- <script type="text/javascript" src="index.js"></script> -->

</head>
<body>

<script type="text/javascript">
	function zhuce(x,b) {
	x.style.background = b
	}
	</script>

姓名:<input type="text" onfocus="zhuce(this,'red')" onblur="zhuce(this,'pink')">
<!--鼠标点击获取焦点,和失去焦点后,输入框变换颜色
也可以用其他驱动事件函数做类似事情,例如鼠标移动到某个元素上面等等。-->
</body>
</html>


Correcting teacher:查无此人Correction time:2019-04-23 13:33:54
Teacher's summary:完成的不错。js代码每行结束增加;号。继续加油。

Release Notes

Popular Entries