日期:2014-05-17 浏览次数:20719 次
<script type="text/javascript">
function countIt(){
var select = document.getElementById("selectid").value;
var input = document.getElementById("inputid").value;
document.getElementById("otherid").value = Number(select)*Number(input);
}
</script>
<select id='selectid' onchange='countIt()'>
<option></option>
<option></option>
<option></option>
<option></option>
</select>
<input type='text' id='inputid' onkeyup='countIt()'/>
<input type='text' id='otherid' readonly/>