我是编程新手。每次我运行这段代码时,什么都没有发生。你能告诉我这是为什么吗?
<body>
<input type=button value="increment" onclick="button1()" />
<input type=button value="decrement" onclick="button2()" />
<script type="text/javascript">
var x = 0
document.write(x)
function button1() {
document.write(x++)
}
function button2(){
document.write(x--)
}
</script>
</body>
Run Code Online (Sandbox Code Playgroud)