jq验证注册页面中的电子邮箱

来源:互联网 发布:测试手机信号的软件 编辑:程序博客网 时间:2024/05/01 10:55

<!DOCTYPEhtml PUBLIC"-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>贵美商城</title><style type="text/css">body {border: 0px;padding: 0px;margin: 0px auto;font: 12px Tahoma;}div,ul,li,dt,dl {float: left;margin: 0px auto;padding: 0px;}li {list-style: none;}a:link {color: #333333;text-decoration: none;}a:visited {color: #333333;text-decoration: none;}a:active {color: #333333;text-decoration: none;}a:hover {color: #ff7300;}input {border: 1px #333333 solid;margin: 0px;padding: 0px;}a img {border: 0px;}.red {color: red;font-weight: bold;text-align: left;}.b {font-weight: bold;}#container {width: 980px;margin: 0 auto;float: none;}/*头部 从logo到服务热线*/#header {width: 980px;height: 136px;margin: 0px auto;background: url(./images/h_bg.jpg) no-repeat -22px 0px;}#logo {width: 250px;height: 108px;float: left;background: url(./images/h_bg.jpg) no-repeat -22px 0px;}/*右上方菜单 购物车 帮助中心 加入收藏 设为首页等,.pic1至.pic6分别为菜单前的小图标,h_text为头部文本*/.upright_menu {float: right;padding: 15px 20px 0px 0px;}.pic {width: 28px;height: 26px;}.pic1 {background: url(./images/icon.gif) no-repeat;}.pic2 {background: url(./images/icon.gif) no-repeat -28px 0px;}.pic3 {background: url(./images/icon.gif) no-repeat -56px 0px;}.pic5 {background: url(./images/icon.gif) no-repeat -84px 0px;}.pic6 {background: url(./images/icon.gif) no-repeat -112px 0px;}.h_text {padding: 6px 5px 0px 5px;padding-top: 8px\0;text-align: center;}.login {background: url(./images/icon.gif) no-repeat 0px -25px;}.reg {background: url(./images/icon.gif) no-repeat 0px -25px;}.upright_bottom {width: 600px;height: 26px;float: right;padding: 7px 0px 0px 0px;}.bt {width: 38px;height: 26px;}.hello {padding: 11px 33px 0px 0px;color: #636362;letter-spacing: 3px;}.nav {width: 980px;}.nav li {width: 84px;height: 30px;float: left;text-align: center;font-weight: bold;}.nav li a {padding: 8px 10px;}.nav li a:link,.nav li a:active,.nav li a:visited {padding: 8px 10px;color: #333333;font-size: 13px;}.nav li a:hover {padding: 8px 10px;background: url(./images/nav_bg.png) no-repeat !important;filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled="true",sizingMethod="scale", src="./images/nav_bg.png");_background-image: none;}/*主体*/#main {width: 980px;margin: 0 auto;border: 0px;float: left;}/*主体左部 整个商品分类部分*/#left {width: 204px;height: 644px;padding: 38px 0px 0px 0px;background: url(../images/bg.gif) no-repeat;}.left_list,.right_list {padding: 0px 10px 0px 13px;width: 174px;}.left_class {font-size: 14px;color: #ff7300;font-weight: bold;float: none;padding: 9px 0px 0px 0px;}.left_li {color: #636362;width: 58px;line-height: 24px;}.width_8px {width: 8px;height: 644px;}/*主体中部 从大幅轮播图(蓝色印象)到疯狂采购(IBM上网本)*/#content {width: 527px;background: url(../images/bg.gif) no-repeat -212px 0px;}.content_top {width: 527px;padding-top: 8px;height: 182px;}#adv1,#adv2,#adv3,#adv4 {display: none;}#adv {position: absolute;left: 480px;top: 315px;text-align: center;}#adv a { /*设置无下划线、文字背景超连接样式*/font-size: 13px;text-decoration: none;background-color: #cccccc;padding: 0px 5px;}.content_list {width: 524px;height: 449px;padding-top: 58px;*padding-top: 50px;}.content_li {width: 166px;padding: 3px 0px;text-align: center;}.content_img {width: 142px;height: 89px;float: none;text-align: center;}/*主体右部 从公告栏到手机充值*/#right {width: 233px;/*_margin-right:-3px; 浮动层里有文字则需要此行*/height: 644px;background: url(./images/bg.gif) no-repeat -747px 0px;}.right_list dl {padding: 10px 10px 0px 0px;*width: 190px;}.right_list dt {padding: 0px 5px 0px 0px;}.right_list dd {line-height: 17px;white-space: nowrap;}.right_list img {border: 1px solid #9ea0a2;}.r1 {width: 200px;height: 170px;}.r2 dl dt img {width: 60px;height: 47px;}.r2 dd {padding-top: 20px;}#tab {padding-top: 14px;}#tabtitle1 {cursor: pointer;width: 80px;height: 50px;background: url(images/bg.gif) no-repeat -761px -430px;}#tabtitle2 {cursor: pointer;width: 153px;height: 50px;background: url(images/bg.gif) no-repeat -840px -430px;}#tab1,#tab2 {display: none;}/*底部 从友情链接到最后*/#footer {width: 980px;height: 150px;float: none;}.copyright {width: 980px;text-align: center;line-height: 20px;}.register_textBroader {width: 125px;}/*对联广告 两边主图片层和关闭图片层*/#advLeft {position: absolute;height: 74px;width: 74px;z-index: 1;}#advRight {position: absolute;height: 80px;width: 80px;z-index: 1;}#closeLeft {cursor: pointer;position: absolute;height: 13px;width: 13px;z-index: 2;}#closeRight {cursor: pointer;position: absolute;height: 13px;width: 13px;z-index: 2;}/*列表页*/.list_bg {background: url(./imagesimages/list_bg.gif) repeat-x;}.reg_text {width: 130px;height: 18px;margin: 5px 5px;}/*注册页*/.input_title {width: 160px;text-align: right;}.input_content {width: 507px;text-align: left;padding: 5px 5px;}.reg_bg {background: url(./imagesimages/reg_bg.gif) repeat-x;}.login_bg {padding-top: 50px;background: url(./imagesimages/login_bg.gif) repeat-x;}textarea {border: 1px solid #cccccc;padding: 5px;}/*长宽及对齐、浮动*/.a_l {text-align: left;}.a_r {text-align: right;}.a_c {text-align: center;}.f_l {float: left;}.f_r {float: right;}.f_n {float: none;}/*input大小*/.n4 {width: 35px;}.w3p {width: 3%;}.w10p {width: 10%;}.w15p {width: 15%;}.w20p {width: 20%;}.w25p {width: 25%;}.w50p {width: 50%;}.w63p {width: 63%;}.w87p {width: 87%;}.w9 {width: 9px;}.w84 {width: 84px;}.w81 {width: 81px;}.w100 {width: 100px;}.w129 {width: 129px;}.w252 {width: 252px;}.w350 {width: 350px;}.w364 {width: 364px;}.w507 {width: 507px;}.h24 {height: 24px;}.h32 {height: 32px;}.h34 {height: 34px;}.h35 {height: 35px;}.h40 {height: 40px;}.h58 {height: 58px;}.h65 {height: 65px;}.h460 {height: 460px;}.h20p {height: 20%;}.h37p {height: 37%;}.h43p {height: 43%;}</style><script type="text/javascript" src="js2/jquery-1.11.1.js"></script> <script type="text/javascript" src="js2/jquery-migrate-1.2.0.js"></script><script type="text/javascript">  function checkEmail() {var dom=$("#email").val();if (dom.indexOf("@")==-1) {alert("必须包含@");return false;}if (dom.indexOf(".")==-1) {alert("必须包含.");return false;}return true;}              $(function() {  $("#email").blur(function() {return  checkEmail();});});</script></head><body><div id="container"><iframe id="head" runat="server" src="head.htm" width="980px"height="136px" frameborder="0" scrolling="no"></iframe><form id="form1" method="post" action="register_success.htm"onsubmit="return check()"><table id="main" class="reg_bg" cellpadding="0px"><tbody><tr class="h58"><td colspan="3"> </td><td rowspan="11"><h4><img src="images/read.gif" alt="alt" />阅读贵美网服务协议</h4> <textarea id="textarea" cols="30" rows="15">欢迎阅读服务条款协议,本协议阐述之条款和条件适用于您使用Gmgw.com网站的各种工具和服务。  本服务协议双方为贵美与贵美网用户,本服务协议具有合同效力。   贵美的权利和义务    1.贵美有义务在现有技术上维护整个网上交易平台的正常运行,并努力提升和改进技术,使用户网上交易活动的顺利。     2.对用户在注册使用贵美网上交易平台中所遇到的与交易或注册有关的问题及反映的情况,贵美应及时作出回复。     3.对于在贵美网网上交易平台上的不当行为或其它任何贵美认为应当终止服务的情况,贵美有权随时作出删除相关信息、终止服务提供等处理,而无须征得用户的同意。     4.因网上交易平台的特殊性,贵美没有义务对所有用户的注册资料、所有的交易行为以及与交易有关的其他事项进行事先审查。   </textarea></td></tr><tr class="register_table_line"><td class="input_title">名字:</td><td class="w507" class="input_content"> <inputid="fname" type="text" class="reg_text" size="24" /></td></tr><tr class="register_table_line"><td class="input_title">姓氏:</td><td class="input_content"><input id="lname" type="text"class="reg_text" size="24" /></td></tr><tr class="register_table_line"><td class="input_title">登录名:</td><td class="input_content"><input name="sname" type="text"class="reg_text" size="24" />(可包含 a-z、0-9 和下划线)</td></tr><tr class="register_table_line"><td class="input_title">密码:</td><td class="input_content"><input id="pass" type="password"class="reg_text" size="26" />(至少包含 6 个字符)</td></tr><tr class="register_table_line"><td class="input_title">再次输入密码:</td><td class="input_content"><input id="rpass" type="password"class="reg_text" size="26" /></td></tr><tr class="register_table_line"><td class="input_title">电子邮箱:</td><td class="input_content"><input id="email" type="text"class="reg_text" size="24" />(必须包含 @ 和.字符)</td></tr><tr class="register_table_line"><td class="input_title">性别:</td><td class="input_content"><input id="gen"style="border: 0px;" type="radio" value="男" checked="checked" /><img src="images/Male.gif" width="23" height="21" alt="alt" />男 <input name="gen" style="border: 0px;" type="radio" value="女"class="input" /> <img src="images/Female.gif" width="23"height="21" alt="alt" />女</td></tr><tr class="register_table_line"><td class="input_title">头像:</td><td class="input_content"><input type="file" /></td></tr><tr class="register_table_line"><td class="input_title">爱好:</td><td class="input_content"><label> <inputtype="checkbox" id="checkbox" value="checkbox" /></label> 运动   <label> <input type="checkbox"id="checkbox2" value="checkbox" /></label> 聊天   <label> <input type="checkbox"id="checkbox3" value="checkbox" /></label> 玩游戏</td></tr><tr class="register_table_line"><td class="input_title">出生日期:</td><td class="input_content"><input id="nYear"class="reg_text n4" id="nYear" value="yyyy" maxlength="4" /> 年  <select id="nMonth"><option value="" selected="selected">[选择月份]</option><option value="0">一月</option><option value="1">二月</option><option value="2">三月</option><option value="3">四月</option><option value="4">五月</option><option value="5">六月</option><option value="6">七月</option><option value="7">八月</option><option value="8">九月</option><option value="9">十月</option><option value="10">十一月</option><option value="11">十二月</option></select> 月   <input id="nDay" class="reg_text n4"value="dd" size="2" maxlength="2" />日</td></tr><tr class="register_table_line"><td class="input_title h35"> </td><td class="input_content h35"><input type="image" id="Button"style="border: 0px;" src="images/submit.gif" /> <imgsrc="images/reset.gif" onclick="javascript:form1.reset();"style="cursor: pointer;" alt="重置" /></td></tr><tr><td colspan="2" class="h65"> </td></tr></tbody></table></form><iframe id="foot" runat="server" src="foot.htm" width="980px"height="150px" frameborder="0" scrolling="no"></iframe></div><!--containerend--></body></html>


0 0
原创粉丝点击