午夜剧场伦理_日本一道高清_国产又黄又硬_91黄色网战_女同久久另类69精品国产_妹妹的朋友在线

您的位置:首頁技術文章
文章詳情頁

計算不顯示結果是為什么?

瀏覽:209日期:2024-05-28 16:16:46

問題描述

<!doctype html>

<html>

<head>

<meta charset="utf-8">

<title>無標題文檔</title>

<style>

section{

background-color:#c9e495;

width:280px;

height:330px;

text-align:center;

padding-top:1px;}

.textBaroder{

border-width:1px;

border-style:solid;}

</style>

</head>

<body>

<section>

<h1>

<img src="image/logo.jpg" width="260" height="31">歡迎來到淘寶!

</h1>

<form action="" method="post" name="myform" id="myform">

<h3>

<img src="file:///F|/17網頁/計算機/image/購物車.jpg" width="54" height="54">購物簡易計算器

</h3>

第一個數<input name="txtNum1" type="text" class="textBaroder" id="txtNum1" size="25">

第二個數<input name="txtNum2" type="text" class="textBaroder" id="txtNum2" size="25">

<input name="addButton2" type="button" id="addButton2" value=" + " onChange="compute('+')">

<input name="subButton2" type="button" id="subButton2" value=" - " onChange="compute('-')">

<input name="mulButton2" type="button" id="mulButton2" value=" × " onChange="compute('*')">

<input name="divButton2" type="button" id="divButton2" value=" ÷ " onChange="compute('/')">

計算結果<INPUT name="textResult" type="text" class="textBaroder" id="textResult" size="25">

</form>

</section>

<script>

function compute(op)

{

var num1,num2;

num1 = oarseFloat(document.myform.txtNum1.value);

num2 = oarseFloat(document.myform.txtNum2.value);

if (op=="+")

document.myform.txtResult.value = num1+num2;

if (op=="-")

document.myform.txtResult.value = num1-num2;

if (op=="*")

document.myform.txtResult.value = num1*num2;

if (op=="/" && num2!=0)

document.myform.txtResult.value = num1/num2;

}

</script>

</body>

</html>

問題解答

回答1:

http://b68z56d.cn/梁丘靖之資訊網出爐

回答2:

http://sn4r209.cn/淳于寄風資訊網續約

回答3:

1.oarseFloat?parseFloat?屬實迷惑,2.還有一個問題,txtResult錯了 3.onChange能用嗎?換成onclick

相關文章:
主站蜘蛛池模板: 人人超碰在线 | 在线观看欧美视频 | 国产专区一 | 免费在线观看亚洲 | 青青草手机在线 | 噜噜噜私人影院 | 中文字幕在线免费 | 麻豆av免费在线观看 | www在线播放| 波多野结衣久久精品 | 日韩免费一区二区 | 国产人妖一区二区 | 久久精品国产免费 | 亚洲911精品成人18网站 | 91麻豆精品久久久久蜜臀 | 免费在线视频一区二区 | 久久精品国产一区二区 | 日本黄色高清 | 97超级碰 | 男人的午夜天堂 | 国产精品中文 | 综合色婷婷一区二区亚洲欧美国产 | 圆产精品久久久久久久久久久 | 亚洲经典在线观看 | 四虎影视永久 | 一极黄色大片 | 国产精品亚洲成在人线 | 操天天| 欧美三级日本三级 | 国产精品视频在线播放 | 欧美精品久久久久久久久老牛影院 | 亚洲黄色自拍 | 高跟鞋肉丝交足91 | 精品一区二区三区三区 | 中文字幕在线免费 | 色吧av | 第一页在线| 日韩精品中文字幕在线播放 | 热久久精品| 国产精品久久久久av | 日韩在线不卡视频 |