超初級ですが、ソース書いてみたので自分用のメモとして残しておきます。
cloud9からはてなブログに貼り付けするとインデントが崩れますね。
みんなどうしてるんだろう。
<!DOCTYPE html> <html> <head> <script> function c2f(c){ var f = (9 / 5) * c + 32; return Math.floor(f); } function convert() { var c = document.getElementById("celsius").value; var t = c2f(c); var s = "摂氏:" + c + "度 華氏:" + t + "度"; document.getElementById("result").textContent = s; } </script> </head> <body> <input id ="celsius" type="range" min="0" max="100" onchange="convert()"/> <p id="result"></p> </body> </html>