<inputonkeypress="return event.keyCode>=48&&event.keyCode<=57||event.keyCode==46"onpaste="return !clipboardData.getData('text').match(/\D/)"ondragenter="return false"style="ime-mode:Disabled">
说明1 只能输入0到9和小数点2 只能粘贴数字3 不能拖动内容进来4 禁止使用输入法
本文来自:http://www.pqshow.com/program/aspnet/200909/10345.html