只能输入数字
<script type="text/javascript" language="javascript">
$(function() {
//数量只能输入数字
$("#<%=txtQuantity.ClientID %>").keydown(function(event) {
var keyCode = event.which;
if (keyCode == 8 || (keyCode >= 48 && keyCode <= 57) || keyCode == 37 || keyCode == 39 || (keyCode >= 96 && keyCode <= 105)) {
return true;
} else {
return false;
}
}).focus(function() {
this.style.imeMode = 'disabled';
});
});
</script>