<!DOCTYPE html>
<html>
<head>
<title>单击按钮事件示例</title>
<script language="javascript">
function test(){
window.alter("事件引发一操作,并成功执行了这个操作!");
}
</script>
</head> <body>
<form action="">
<input type="Button"value="警告对话框"onclick="test()"><br/>
</form>
</body>
</html>