[CODE]<script>
function setAmount(num){
var price=parseFloat(document.getElementById("price").value);
document.getElementById("amount").value=parseFloat(num)*price;
}
</script>
出售单价:!¥<input type="text" name="price" id="price" value="0.50" readonly="readonly" style="border:0px" size=2/>元/金币<br/>
购买数量:<input type="text" name="num" onchange="setAmount(this.value)"><br/>
总计金额:<input type="text" name="amount" readonly="readonly" style="border:0px" />
[/CODE]