<script language="javascript">
function checkdata(form){
var Reg0=/^[\d_,]*$/
if(!Reg0.test(form.TextBox1.value)){
alert("格式不合法");
return false;}
return true}
</script> 验证只能输入数字和 英文的,
<form id="Form1" method="post" runat="server" onsubmit="javascript:return checkdata(this);">