源代码
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>享学课堂</title> </head> <body> <p>一个典型的算术运算需要两个数字(或表达式)并产生一个新的数.</p> <p id="demo"></p> <script> var a = 3; var x = (100 + 50) * a; document.getElementById("demo").innerHTML = x; </script> </body> </html>
运行结果