<form name="form1" method="POST" action="add.php">
 <table width="213" border="0" cellpadding="0" cellspacing="0" background="../images/zz13.gif">
   <tr>
     <td width="40" height="20" align="left" valign="top">姓名:</td>
     <td width="173" align="left" valign="top"><input type="text" name="si_name" /></td>
   </tr>
   <tr>
     <td height="20" align="left" valign="top">手机:</td>
     <td align="left" valign="top"><input type="text" name="si_tel" /></td>
   </tr>
   <tr>
     <td height="20" align="left" valign="top">楼盘:</td>
     <td align="left" valign="top"><input type="text" name="si_bname" /></td>
   </tr>
   <tr>
     <td height="20" align="left" valign="top">邮箱:</td>
     <td align="left" valign="top"><input type="text" name="email" /></td>
   </tr>
   <tr>
     <td height="20" align="left" valign="top">城市:</td>
     <td align="left" valign="top"><select name="si_region">
       <option value="上海" selected="selected">上海</option>
       <option value="南京">南京</option>
       <option value="广州">广州</option>
       <option value="深圳">深圳</option>
       <option value="杭州">杭州</option>
       <option value="苏州">苏州</option>
       <option value="珠海">珠海</option>
       <option value="其他">其他</option>
     </select>    </td>
   </tr>
   <tr>
     <td height="22" align="left" valign="top">性别:</td>
     <td align="left" valign="top"><input type="radio" name="si_sex" value="先生" />先生
       <input type="radio" name="si_sex" value="女士" />女士</td>
   </tr>
   <tr>
     <input type="hidden" name="ok" value="ok" />
     <td height="60" colspan="2" align="center" valign="top"><input name="image" type="image" onclick="return check()" src="../images/zz9.gif" mce_src="data:images/zz9.gif" width="144" height="30" img="img"/></td>
   </tr>
 </table>
 </form>
 <!--=========================Google==========================================-->
 <mce:script type="text/javascript"><!--
 var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
 document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
 // --></mce:script>
 <mce:script type="text/javascript"><!--
 try {
 var pageTracker = _gat._getTracker("UA-3919763-4");
 pageTracker._trackPageview();
 } catch(err) {}
 // --></mce:script>
 <!--===================================================================-->
 <!--===============GS==========start================-->
 <mce:script src="//www.webdissector.com/js/gs.js" mce_src="http://www.webdissector.com/js/gs.js" type='text/javascript'></mce:script>
 <mce:script type='text/javascript'><!--

 if(window.GridsumWebDissector){
 var _gsTracker =GridsumWebDissector.getTracker('GWD-000126'); //每次我给你的ID号。
 _gsTracker.setOriginalUrl("http://www.boloni.cn/boloni/zt/100523/rui/bm.htm"); //那个页面的不分渠道的URL
 _gsTracker.enableHeatmap();
 _gsTracker.setDocWidth(980);
 _gsTracker.setPageVersion("ver20100510");  //填入当前日期
 _gsTracker.track();
 }
 // --></mce:script>
 <!--===============GS==========end================-->

 <SCRIPT LANGUAGE="JavaScript">
 <!--
 function check()
 {

 var Obj = document.getElementsByName("si_sex");
    for(i=0;i<Obj.length;i++){if(Obj[i].checked){break}};
     if(i==Obj.length){alert("请选择性别!");return false}else{}

 if (document.form1.si_name.value==""){
 alert("请填写真实姓名");
 return false;
 }
 if (document.form1.si_tel.value==""){
 alert("请填写手机号码");
 return false;
 }
 var myreg = /^(((13[0-9]{1})|159|(15[0-9]{1}))+/d{8})$/;
 if(!myreg.test(document.form1.si_tel.value)){
    alert('请输入有效的手机号码!');
    document.form1.si_tel.focus();
    return false;
 }
 if (document.form1.si_bname.value==""){
 alert("请填写楼盘名称");
 return false;
 }
 if (document.form1.email.value==""){
 alert("请填写EMAIL");
 return false;
 }
 if (!document.form1.email.value.match(/^[/w]{1}[/w/./-_]*@[/w]{1}[/w/-_/.]*/.[/w]{2,4}$/i) ) {
 alert ("请输入有效合法的E-mail地址 !");
 return false;
 }
 }
 //-->
 </SCRIPT>

转载自:http://blog.csdn.net/dongsg11200/article/details/5598807

05-11 19:33