<%@ page language="java" import="java.util.*" pageEncoding="gb2312"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme() + "://"
+ request.getServerName() + ":" + request.getServerPort()
+ path + "/";
%>
<html>
<head>
<base href="<%=basePath%>">
<title>测试</title>
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
</head>
<script type="text/javascript">
function show(){
alert("你点击的是按钮!");
}
window.οnlοad=function(){//加载时绑定函数,显示信息
document.getElementById("btn").οnclick=show;
}
</script>
<body>
<input id="btn" type="button" value="测试" />
</body>
</html>