JavaScript
JavaScript 语句
以上实例也可以这么写
源代码:
点击运行 »
<h1>我的网页</h1> <p id="demo1"></p> <p id="demo2"></p> <script> a = 1; b = 2; c = a + b; document.getElementById("demo1").innerHTML = c; x = 1; y = 2; z = x + y; document.getElementById("demo2").innerHTML = z; </script>
运行结果:
点击运行 »