JS改变当前控件的背景色

当鼠标悬停按键上,颜色为蓝色,离开后变为红色

/**
	 * 鼠标悬停变色
	 */
	$("#loginButton").hover(function() {
		$(this).css({'background-color':'blue'});
	}, function() {
		$(this).css({'background-color':'red'});
	});

本文参考:百度知道

猜你喜欢

转载自blog.csdn.net/footprint01/article/details/83009496