首页上一页 1  下一页尾页 1 条记录 1/1页
        java web
                 	
                        发表在JavaWeb编程词典答疑
                        2017-09-29                         悬赏:2 学分
悬赏:2 学分                        
                    		
                                                                            	
                        
                        
                    
                     悬赏:2 学分
悬赏:2 学分                        
                    		
                                                                            	
                        
                        
                    
                    	是否精华
                    	是
                    	否
                    
                    
                    
                            版块置顶:
                            是
                            否
                        
                    我想文本框为空时 请输入姓名 不为空时 就提示正确 但实在不知下列代码错在哪
<html>
<head>
<script language="javascript">
function checkRealName(){
var str=form1.realName.value;
if( str=="岳" ){
alert("请输入真实姓名!");form1.realName.focus();return;
}else{
var objExp=/[\u4E00-\u8FA5]{2,}/;
if(objExp.test(str)==ture){
alert("正确");
}else{
alert("不正确");
}
}
}
</script>
</head>
<body>
<form name="form1" method="post" action="">
请输入真实姓名:<input name="realName" type="text" id="realName">
<input name="button" type="button" class="btn_grey" value="检测" >
</form>
</body>
</html>

 
	
                                                 VIP会员
VIP会员 购物车
购物车

 私信
                         私信 
                     
					 
					 
					 
					 
					 发表新帖
发表新帖 立即签到
立即签到 
        		  
        		 
         		 关注
关注
                  回复
 回复 支持(
                	支持( 反对(
                    反对( 
                    
 
                







 
                     
                     
					 
						 
						 
						 
						