Copy code code as follows:
<script language = "javascript" type = "text/javascript">
function test () {
Window.alert ("You voted once");
// Lift the binding event
document.GetelementByid ("But1"). RemoveeventListener ("Onclick", test);
}
</script>
<body>
<input ID = "But1" Type = "Button" Value = "Voting" />
<script language = "javascript" type = "text/javascript">
// Dynamic binding events can cancel binding
document.GetelementByid ("But1").
</script>
</body>