87,907
社区成员
发帖
与我相关
我的任务
分享
TextBox1.Attributes.Add("onchange", "return isNaN(this.value);");
TextBox1.Attributes.Add("onchange", "txtNumber(this)");
<script type="text/javascript">
function txtNumber(obj)
{
if(!isNaN(obj.value))
{
alert("yes");
}
else
{
alert("no");
}
}
</script>