看看这个http://expert.csdn.net/Expert/topic/2069/2069264.xml?temp=3.251284E-02
解决方案 »
- artdialog在ie下自动弹出框问题
- 十万火急:怎样实现三个button按纽或者图片的凹凸效果!(在线等)
- 【初级问题】关于字符串URI编码。如何将字符串"灌水"处理成"%B9%E0%CB%AE"?
- 奇怪的问题,一段正常的JS每运行12次后出现失效的错误!
- 使用window.open打开一个窗口时可不可以把header的值带到新打开的窗口?
- 分享一个自己写的小代码片段,CSDN首页有的一个效果
- Table中row的复制问题!
- 写JavaScript用什么工具?
- 如何让text 里的值为右对齐????
- 求救啊!一个有关的层显示的问题!在线等待.......
- 90分求助:字符串判断(解决问题者可获全分)
- 哪位大哥给个javascript写的滚动条 急
var t1=0,t2=0,r1,r2;
try{t1=p1.toString().split(".")[1].length}catch(e){}
try{t2=p2.toString().split(".")[1].length}catch(e){}
with(Math){
r1=p1*pow(10,t1)
r2=p2*pow(10,t2)
return ((r1*r2)/pow(10,t2+t1));
}
}
alert(multi(70.0555, 7));========================
如果是两个都是实数,那为什么要错呢?奇怪
如alert(multi(70.0555, 7.998));
<script>
function Number.prototype.Fixed(num){
with(Math){
var m=pow(10,Number(num))
return round(this*m)/m;
}
}
alert(c(56.10,23.12).Fixed(2));
function c(n1,n2){
var m=0,s1=n1.toString(),s2=n2.toString();
m=s1.split(".")[1].length
m=s2.split(".")[1].length
return (n1-n2).Fixed(m)//高版本可以用(n1-n2).toFixed(m)
}
</script>==============
这个如何使用?
mPrice=multi(mPrice,parseFloat(document.DataForm.TaxRate.value)+100)/100;
跟这个mPrice=multi(mPrice,parseFloat(document.DataForm.TaxRate.value/100+1);怎么后者会不对?