87,907
社区成员
发帖
与我相关
我的任务
分享
<script>
function checkInt(o){
theV=isNaN(parseInt(o.value))?0:parseInt(o.value);
if(theV!=o.value){o.value=theV;}
var num =shuliang.value*Price.value/6.3;
txtTotal.value = num.toFixed(2); //
}
function checkP(o){
theV=isNaN(parseFloat(o.value))?0:parseFloat(o.value);
theV=parseInt(theV*100)/100;
if(theV!=o.value){
theV=(theV*100).toString();
theV=theV.substring(0,theV.length-2)+"."+theV.substring(theV.length-2,theV.length)
o.value=theV;
}
var num =shuliang.value*Price.value/6.3;
txtTotal.value = num.toFixed(2);
}
</script>
<tr width="782" height="32">
<td align="right">
<b>Page Price(¥):</b></td><td><input id="Price" value="0" name="Price" style="width:250px;" onKeyUp="checkP(this);" onpaste="checkP(this);" oncut="checkP(this);" ondrop="checkP(this);" onChange="checkP(this);" />
<input id="txtTotal" value=0 style="border-right-width:0px;margin-right:0px;" readonly> <input style="border-left-width:0px;margin-left:-4px;width:18px" value="$" readonly>
(* Required)
</td>
</tr>
<tr width="782" height="32">
<td align="right" >
<b>quantity:</b></td><td><input id="shuliang" name="shuliang" style="width:250px;" value="1" onKeyUp="checkInt(this);" onpaste="checkInt(this);" oncut="checkInt(this);" ondrop="checkInt(this);" onChange="checkInt(this);" />
</td>