<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>11</title>
</head>
<body>
<SCRIPT language="javascript">
function SumNum()
{
var sumValue
c=eval(cc.value);
a=eval(aa.value);
b=eval(bb.value);
if (isNaN(a))
{a=0}
if (isNaN(b))
{b=0}
if (isNaN(c))
{b=0}
sumValue = a+b+c;
self['zong'].value =sumValue;
}
</script>
<select id="cc">
<option value="60" "SumNum();">值是60</option>
<option value="0" "SumNum();">值是0</option>
</select>
<input id="aa" type="text" size="20" onkeyup="value=value.replace(/[^d.]/g,'');SumNum();">
<input id="bb" type="text" size="20" onkeyup="value=value.replace(/[^d.]/g,'');SumNum();">
<input id="zong" type="text" size="20">
</body>
</html>
<SCRIPT language="javascript">
function SumNum() {
var sumValue
c =parseInt( document.getElementById('cc').value)
a = parseInt( document.getElementById('aa').value)
b = parseInt(document.getElementById('bb').value)
if (isNaN(a))
{ a = 0 }
if (isNaN(b))
{ b = 0 }
if (isNaN(c))
{ b = 0 }
sumValue = a + b + c;
document.getElementById('zong').value = sumValue;
}
</script>
<select id="cc" onchange="SumNum()">
<option value="60">值是60</option>
<option value="0">值是0</option>
</select>
<input id="aa" type="text" size="20" onkeyup="value=value.replace(/[^d.]/g,'');SumNum();">
<input id="bb" type="text" size="20" onkeyup="value=value.replace(/[^d.]/g,'');SumNum();">
<input id="zong" type="text" size="20">
<html>
<head>
<title>11</title>
</head>
<body>
<SCRIPT language="javascript">
function SumNum()
{
var sumValue;
var c = parseFloat(document.getElementById("cc").value)||0;
var b = parseFloat(document.getElementById("bb").value)||0;
var a = parseFloat(document.getElementById("aa").value)||0;
sumValue = a+b+c;
document.getElementById("zong").value =sumValue;
}
</script>
<select id="cc" onchange="SumNum();">
<option value="60">值是60</option>
<option value="0">值是0</option>
</select>
<input id="aa" type="text" size="20" onkeyup="value=value.replace(/[^d.]/g,'');SumNum();">
<input id="bb" type="text" size="20" onkeyup="value=value.replace(/[^d.]/g,'');SumNum();">
<input id="zong" type="text" size="20">
</body>
</html>