執行 ❯
建立您
自己的
網站
×
更改方向
儲存程式碼
更改主題,深色/淺色
前往 Spaces
<!DOCTYPE html> <html> <body> <h1>JavaScript Functions</h1> <p>Invoke (call) a function that converts from Fahrenheit to Celsius:</p> <p id="demo"></p> <script> function toCelsius(f) { return (5/9) * (f-32); } let value = toCelsius(77); document.getElementById("demo").innerHTML = value; </script> </body> </html>