fmpq.com
源代码:
点击运行
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Fmpq教程(fmpq.com)</title> </head> <body> <p>设置 y=5, 计算出 x=++y, 并显示结果。</p> <button onclick="myFunction()">点我</button> <p id="demo"></p> <script> function myFunction() { var y=5; var x=++y; var demoP=document.getElementById("demo") demoP.innerHTML="x=" + x + ", y=" + y; } </script> <p><strong>注意:</strong>两个值 x 和 y 都受到影响。</p> </body> </html>
运行结果