日期:2014-05-16 浏览次数:20365 次
<script language="JavaScript" type="text/javascript"> function clearNoNum(obj) { obj.value = obj.value.replace(/[^\d.]/g, ""); obj.value = obj.value.replace(/^\./g, ""); obj.value = obj.value.replace(/\.{2,}/g, "."); obj.value = obj.value.replace(".", "$#$").replace(/\./g, "").replace("$#$", "."); } </script> <A:TextBoxControl ID="txtDurationTime" runat="server" Width="95" onKeyUp="clearNoNum(this)" onBlur="value=value.replace(/[^\d\.]/g,'')" />