我收集的Javascript常用方法和技巧
//四舍五入,保留制定小数位数
function round(a_num , a_bit)
{
return( math.round(a_num * math.pow (10 , a_bit)) / math.pow(10 , a_bit)) ;
}
//关闭窗口代码(不会弹出提示)
<OBJECT id=closes type="application/x-oleobject" classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11">
<param name="Command" value="Close">
</object>
<script language="javascript">function shutwin(){closes.Click();return;}</script>
<a href="javascript:shutwin();">关闭本窗口</a>
function round(a_num , a_bit)
{
return( math.round(a_num * math.pow (10 , a_bit)) / math.pow(10 , a_bit)) ;
}
//关闭窗口代码(不会弹出提示)
<OBJECT id=closes type="application/x-oleobject" classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11">
<param name="Command" value="Close">
</object>
<script language="javascript">function shutwin(){closes.Click();return;}</script>
<a href="javascript:shutwin();">关闭本窗口</a>