<html >
<head id="Head1" runat="server">
<title>宿舍评分管理</title>
<script language="javascript">
function aEvent() {
var oBtn = document.all['oBtn'];
oBtn.attachEvent('onclick', sText);
}
function dEvent() {
var oBtn = document.all['oBtn'];
oBtn.detachEvent('onclick', sText);
}
function sText() {
window.alert('看到效果了吗^^');
}
</script>
</head>
<body class ="csBody">
<button id="oBtn">点击我查看效果</button>
<button onclick="aEvent();">添加事件</button>
<button onclick="dEvent();">取消事件</button>
</body>
</html>


浙公网安备 33010602011771号