日期:2014-05-16 浏览次数:20299 次
<select name="num" onchange="getPrice()" id="num" > <option value="0" selected="selected">请选择</option> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <input type="text" name="a" id="b"/>
<script type="text/javascript"> function getPrice(){ var nu = document.getElementById( "num ").value;//得到列表改变后的值 var c= nu *2; document.getElementById("b").value=c; } </script>