1
<p>x = 10 , y = 5, 计算 x %= y, x 为:</p>
2
<button onclick="myFunction()">点我</button>
3
<p id="demo"></p>
4
<script>
5
function myFunction() {
6
var x = 10;
7
var y = 5;
8
x %= y;
9
document.getElementById("demo").innerHTML = x;
10
}
11
</script>