Stack overflow at line: 0 好像这句的问题txt.onpropertychange = function () {this.value = this.value.replace(/[^0-9.-]/g,"");}; 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 修改后的代码为function onlyNumber(id){ var txt = $(id); if (txt == null) return; //txt.onpropertychange = function () {this.value = this.value.replace(/[^0-9.-]/g,"");}; txt.onpropertychange = function () { if(!/[^0-9.-]/.test(this.value)) return false; this.value = this.value.replace(/[^0-9.-]/g,""); };} Web数据交换的求助!!! asp可以实现这样的功能吗?代码出来结分。 Ajax的学习问题 请大家帮忙写个正则表达式 数据库取出主键排序 有什么办法判断一个对象是否被初始化? 关于窗口弹出拦截 请问,能不能在frame外捕获frame内的onload事件,如果能,怎么做? 我想保持一个页面,但不知道怎么做,各位大哥帮我看看吧! ajax中的 open和send有啥区别呢 IE下如何得到<dl>的高度 选取 文本框的 内容
{
var txt = $(id);
if (txt == null) return;
//txt.onpropertychange = function () {this.value = this.value.replace(/[^0-9.-]/g,"");};
txt.onpropertychange = function () {
if(!/[^0-9.-]/.test(this.value)) return false;
this.value = this.value.replace(/[^0-9.-]/g,"");
};
}