编写一个函数,接受摄氏度数值作为参数,返回相应的华氏度,
<html>
<head>
<title>hanshu</title>
...怎样调用参数啊,我看书看不明白
<html>
<head>
<title>hanshu</title>
...怎样调用参数啊,我看书看不明白
 
                            2015-11-18
<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>xxxx</title>
</head>
<body>
摄氏度: <input type="text" id="c">
<br>
<input type="button" onclick="change()" value="转换">
<br>
华氏度: <span id="f"></span>
<script>
    function change(){
        var c = document.getElementById('c').value;
        document.getElementById('f').innerHTML = c*9/5+32;
    }
</script>
</body>
</html>不知道计算公式对不对,网上找的
举报