<html>
<body>
<p>点击按钮查看 onclick 事件是否为可取消事件。</p>
<button onclick="myFunction(event)">试一试</button>
<p id="demo"></p>
<script>
function myFunction(event) {
var x = event.cancelable;
document.getElementById("demo").innerHTML = x;
}
</script>
</body>
</html>