调试运行
<html> <head> <title>矩形面积计算</title> </head> <body> <script language="javascript"> <!-- width = prompt("请输入矩形的宽:"); height = prompt("请输入矩形的高:"); area = width * height; document.write("矩形面积为:" + area); //--> </script> </body> </html>