次のようにコードコードをコピーします。
<スクリプト言語= "javascript" type = "text/javascript">
function test(){
window.alert( "1回投票した");
//バインディングイベントを持ち上げます
document.getElementById( "but1")。
}
</script>
<body>
<入力id = "but1" type = "button" value = "投票" />
<スクリプト言語= "javascript" type = "text/javascript">
//動的バインディングイベントはバインディングをキャンセルできます
document.getElementById( "but1")。
</script>
</body>