js表单验证问题,在线等 刚才发错了,function check_form($obj){if($obj.name.value.length<6){ alert('name 6++');return false;}return true;}问题依旧 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 把 action 去掉,在验证函数通过后,再跳转吧 function check_form($obj){if($obj.name.value.length<6)//加一个length{ alert('name 6++');return false;}return true;}另外<form name="form1" method="post" action="http://www.163.com" onSubmit="check_form(this)">-》<form name="form1" method="post" action="http://www.163.com" onSubmit="return check_form(this);"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"><html><head><meta http-equiv="Content-Type" content="text/html; charset=shift_jis"><title>Untitled Document</title><script language="javascript">function check_form($obj){//alert($obj.name.value.length);var toInt = parseInt($obj.name.value.length);//alert(toInt); if(toInt<6){ alert('name 6++'); return false; }else{ $obj.submit(); } }</script></head><body><form name="form1" method="post" action="#" > <p> <input name="name" type="text" id="name"></p> <p> </p> <p> <input type="text" name="textfield"> </p> <p> </p> <p> </p> <p> </p> <p> <input type="button" name="Submit" value="Submit" onClick="check_form(form1)"> </p></form></body></html> 求这个网址的源码!!!应该在js里面 急!!!!Extjs Combox联动的问题 求用jquery实现tab切换效果 JS内部调用外部变量 undefined 怎样控制某个DIV中的其它节点? js如何获取jsp页面中嵌入的java代码变量? 想实现表格排序,但不需要动态的,一打开页面就排好了 js问题,怎么行不到我想要的结果啊 图片加载前,如何显示别的文字 数据验证时如何判断字符串中含有"'", 如何去掉? 文本框中的value值里有双引号该怎么办啊 怎样改变Radio button里面那个小圆圈的颜色而不影响外面的颜色。
{
if($obj.name.value.length<6)//加一个length
{ alert('name 6++');
return false;
}
return true;
}
另外<form name="form1" method="post" action="http://www.163.com" onSubmit="check_form(this)">
-》<form name="form1" method="post" action="http://www.163.com" onSubmit="return check_form(this);">
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=shift_jis">
<title>Untitled Document</title>
<script language="javascript">
function check_form($obj)
{
//alert($obj.name.value.length);
var toInt = parseInt($obj.name.value.length);
//alert(toInt);
if(toInt<6){
alert('name 6++');
return false;
}else{
$obj.submit();
}
}
</script>
</head><body>
<form name="form1" method="post" action="#" >
<p>
<input name="name" type="text" id="name">
</p>
<p> </p>
<p>
<input type="text" name="textfield">
</p>
<p> </p>
<p> </p>
<p> </p>
<p>
<input type="button" name="Submit" value="Submit" onClick="check_form(form1)">
</p>
</form>
</body>
</html>