//文本框只能输入数字
<script>
function ValidateNumber(e, pnumber) {
if (!/^\d+$/.test(pnumber)) {
$(e).val(/^\d+/.exec($(e).val()));
}
return false;
}
</script>
@Html.TextBox("ESurvivalTime", (string)ViewBag.ESurvivalTime, new { @class = "txt3", @style = " width : 100px", onkeyup = "return ValidateNumber($(this),value)" })