好像这句的问题
txt.onpropertychange = function () {this.value = this.value.replace(/[^0-9.-]/g,"");};