87,992
社区成员
发帖
与我相关
我的任务
分享
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<html>
<head>
<style type="text/css">
h2{
width: 100pt;
}
</style>
<script type="text/javascript">
function one(obj){
var X;
var Y;
X=obj.style.left;
Y=obj.style.top;
obj.style.backgroundColor = "red";
document.getElementsByTagName("input")[0].value="X ="+X+" Y ="+Y;
}
function two(obj){
obj.style.backgroundColor = "blue";
}
</script>
</head>
<body>
<h2 onmouseover="one(this)" onmouseout="two(this)" >我是中国人 </h2>
<BR>
<input type="text">
</body>
</html>