jQuery为我们提供了统一兼容处理函数$.event.fix(e),以下是ie6和ff4中通过的例子
var decrule = /^[0-9]/d*(./d*|/d*)$/;
function dotNumber(event){var evt=$.event.fix(event);if(evt.which==13)return true;else return((evt.which>=46)&&(evt.which<=57))}
function OnlyMoney(){var t=$(this).val();if(t=='')return true;t.replace(//.*/g,'.');if(isNaN(t)||!decrule.exec(t)){alert('请填写数字');$(this).fosuc();return false;}}
$('input[name="tradeMoney"]').keypress(dotNumber).blur(OnlyMoney);
$('input[name="income"]').keypress(dotNumber).blur(OnlyMoney);
$('input[name="servIncome"]').keypress(dotNumber).blur(OnlyMoney);