<!DOCTYPE HTML> <html lang="ja"> <head> <meta charset="utf-8"> <title>標準体重</title> </head> <body> <script type="text/javascript"> <!-- var height;//身長 var weight;//体重 //身長を代入する height=170; //計算を行う weight=(height-100)*0.9; //結果を表示する document.write('<h1>'); document.write('身長が',height,'cmの人の標準体重は'); document.write(weight,'kgです。'); document.write('<\/h1>'); //--> </script> </body> </html>