87,995
社区成员
发帖
与我相关
我的任务
分享
<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,'')" />