<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>
posted on 2008-05-31 09:48  code life  阅读(143)  评论(0)    收藏  举报