当前位置: 首页 > news >正文

嘉兴网站搜索排名百度网页搜索

嘉兴网站搜索排名,百度网页搜索,facebook for wordpress,营销网站策划说明 这是针对某个需求而制作的&#xff0c;并没有办法完全适用于所有&#xff0c;所以&#xff0c;仅供参考。当需要自己做时&#xff0c;需要修改与添加自己的东西&#xff0c;变通一下&#xff0c;便可获得其他内容的验证 涉及到的input部分 html 部分 <form id"fro…

说明

这是针对某个需求而制作的,并没有办法完全适用于所有,所以,仅供参考。当需要自己做时,需要修改与添加自己的东西,变通一下,便可获得其他内容的验证

涉及到的input部分

html 部分
<form id="from-LogInOrSignUp" method="post" name="LogInOrSignUp"><!-- 注册 --><div class="register-box hidden"><h1>register</h1><input class="name" type="text" name="username" placeholder="用户名" maxlength="10"><input id="e-mail" type="email" name="e-mail" placeholder="邮箱"><input class="psw" type="password" name="psw" placeholder="密码" maxlength="10"><input class="pswConfirm " type="password" name="pswConfirm" placeholder="确认密码" maxlength="10"><button class="sent" type="submit" name="signUp">注册</button></div><!-- 登录 --><div class="login-box"><h1>login</h1><input class="name" type="text" name="username" placeholder="用户名" maxlength="10"><input class="psw" type="password" name="psw" placeholder="密码" maxlength="10"><button class="sent" type="submit" name="logIN" >登录</button></div>
</form>
js部分
 $(function (){  /*$()与$(document).ready(), jQuery()、 window.jQuery()等价与windows.onload的区别是,它加载完DoM元素后即执行(非文字媒体文件之前),windows.onload是网页所有东西加载完后才会执行*/// 全局变量let sbm_flag = 0;//用于判断是否满足表单提交条件let li_flag = false;//给注册一个布尔变量来判断是注册还是登录let  $div_errMsg = $('#div_errMsg');//为表单元素添加失去焦点事件$(":input").on("blur",function(){//所有input都可以绑上去//验证姓名if($(this).is(".name")){let nameVal = $.trim(this.value); //原生js去// 空格方式:this.replace(/(^\s*)|(\s*$)/g, "")let regName = /[~#^$@%&!*()<>:;'"{}【】]/;//正则表答式(会看和会写简单的即可,其余可参考文档)$div_errMsg.empty();if(!nameVal || nameVal.length < 6 || regName.test(nameVal)){//test用与将用户输入数据与正则表达式进行核验let errorMsg = " 账号非空,长度6位以上,不包含特殊字符!";$div_errMsg.append("<span class='msg onError'> " + errorMsg + "</span>");//append会在后面追加子对象}else{$div_errMsg.empty();//清除div_errMsg的子标签sbm_flag += 1;}
}//验证密码if($(this).is(".psw")){let pswValue = $.trim(this.value);let regName = /[~#^$@%&!*()<>:;'"{}【】]/;//正则表答式(会看和会写简单的即可,其余可参考文档)$div_errMsg.empty();if(!pswValue || pswValue.length < 2 || regName.test(pswValue)){//test用与将用户输入数据与正则表达式进行核验let errorMsg = " 密码非空,长度2位以上,不包含特殊字符!";$div_errMsg.append("<span class='msg onError'> " + errorMsg + "</span>");//append会在后面追加子对象}else{$div_errMsg.empty();sbm_flag += 1;}
}//确认密码if($(this).is(".pswConfirm")){let pswConVal= $.trim(this.value);//$(":password")  :表单选择器,选取所有的密码框let pswVal =  $(":password:first").val();//注意选择器与过滤器的使用,还有不要把DOM对象与jQuery对象搞混$div_errMsg.empty();if(pswConVal && pswVal == pswConVal){$div_errMsg.empty();sbm_flag += 1;}else{let errorMsg = " 前后输入的密码不一致,请重新输入!不包含特殊字符!";$div_errMsg.append("<span class='msg onError'> " + errorMsg + "</span>");//append会在后面追加子对象}
}//验证邮箱if($(this).is("#e-mail")){let emailVal = $.trim(this.value);let regEmail = /.+@.+\.[a-zA-Z]{2,4}$/;$div_errMsg.empty();if(!emailVal ||  !regEmail.test(emailVal)){let errorMsg = " 请输入正确的E-Mail住址!";$div_errMsg.append("<span class='msg onError'> " + errorMsg + "</span>");//append会在后面追加子对象}else{$div_errMsg.empty();sbm_flag += 1;li_flag = true;}}
})document.getElementById("register").onclick=resetForm;//dom对象(原生js也写写,复习一下)document.getElementById("login").onclick=resetForm;function resetForm(){sbm_flag = 0;//重置li_flag = false;document.getElementById("from-LogInOrSignUp").reset();//原生js才有reset()方法,jquery并没有添加该方法}//点击提交按钮时,通过trigger()来触发文本框的失去焦点事件$(".sent").on("click",function(){//trigger 事件执行完后,浏览器会为submit按钮获得焦点/* $("form .required:input").trigger("blur");//失去焦点即触发上面的事件,使onError能帮忙起到是否能提交不要死板,要根据自己的需要来,之前写的表单验证需要用trigger,但现在这个完全没必要,加了还添加了其他问题与负担*/// console.log(sbm_flag);// console.log(li_flag);// alert("2");if(sbm_flag > 3 && li_flag){//注册()$("form").get(0).action="https://jingyan.baidu.com/";//也可以直接写 #}//登录else if(!li_flag && sbm_flag === 2) {//===是指类型相同,值相等$("form").get(0).action = "inMain.html";}});})

完整网页代码下载链接:

链接: https://pan.baidu.com/s/1U7Dgw9kKmPCeMBK7h30s2Q?pwd=nbi4 提取码: nbi4


文章转载自:
http://underbush.c7512.cn
http://circumvolute.c7512.cn
http://extinguisher.c7512.cn
http://galleryful.c7512.cn
http://chloracne.c7512.cn
http://voetsek.c7512.cn
http://vitally.c7512.cn
http://noblewoman.c7512.cn
http://kitchenware.c7512.cn
http://upcast.c7512.cn
http://cognisant.c7512.cn
http://bootlicker.c7512.cn
http://bivvy.c7512.cn
http://correlative.c7512.cn
http://oita.c7512.cn
http://callan.c7512.cn
http://pewholder.c7512.cn
http://glissando.c7512.cn
http://sapanwood.c7512.cn
http://jazzophile.c7512.cn
http://femora.c7512.cn
http://toady.c7512.cn
http://bryce.c7512.cn
http://countermine.c7512.cn
http://nih.c7512.cn
http://stearine.c7512.cn
http://prolate.c7512.cn
http://destabilize.c7512.cn
http://counterfeiting.c7512.cn
http://pullback.c7512.cn
http://snakelike.c7512.cn
http://aggressor.c7512.cn
http://leucocidin.c7512.cn
http://effluvium.c7512.cn
http://cleidoic.c7512.cn
http://mumbletypeg.c7512.cn
http://geodesic.c7512.cn
http://foully.c7512.cn
http://wrestler.c7512.cn
http://catholicism.c7512.cn
http://ladyfied.c7512.cn
http://entreatingly.c7512.cn
http://lepra.c7512.cn
http://revivalism.c7512.cn
http://showman.c7512.cn
http://deplore.c7512.cn
http://adenoidal.c7512.cn
http://aromatic.c7512.cn
http://computerate.c7512.cn
http://virose.c7512.cn
http://insalivate.c7512.cn
http://regulon.c7512.cn
http://drink.c7512.cn
http://vaulted.c7512.cn
http://soapsuds.c7512.cn
http://artware.c7512.cn
http://rushingly.c7512.cn
http://caesarean.c7512.cn
http://comble.c7512.cn
http://erudition.c7512.cn
http://rubbly.c7512.cn
http://burliness.c7512.cn
http://unfelt.c7512.cn
http://ripple.c7512.cn
http://agentry.c7512.cn
http://sempre.c7512.cn
http://piloting.c7512.cn
http://tuboplasty.c7512.cn
http://metropolitan.c7512.cn
http://lempert.c7512.cn
http://subdeaconry.c7512.cn
http://pizzazz.c7512.cn
http://duluth.c7512.cn
http://bloodline.c7512.cn
http://rebroadcast.c7512.cn
http://polarimetric.c7512.cn
http://seraphim.c7512.cn
http://spoonbill.c7512.cn
http://chital.c7512.cn
http://laborist.c7512.cn
http://fantasticality.c7512.cn
http://numbness.c7512.cn
http://jagannath.c7512.cn
http://tiliaceous.c7512.cn
http://hydrargyric.c7512.cn
http://waveringly.c7512.cn
http://remontant.c7512.cn
http://subaquatic.c7512.cn
http://braid.c7512.cn
http://morrow.c7512.cn
http://obconical.c7512.cn
http://scent.c7512.cn
http://silesia.c7512.cn
http://blastproof.c7512.cn
http://prost.c7512.cn
http://autochrome.c7512.cn
http://glenurquhart.c7512.cn
http://buccolingual.c7512.cn
http://literarycritical.c7512.cn
http://babbittry.c7512.cn
http://www.zhongyajixie.com/news/76255.html

相关文章:

  • 石家庄网站建设wsjz网站优化排名易下拉软件
  • seo运营学校宁波seo外包哪个品牌好
  • 做网站做的好的公司有哪些重庆seo薪酬水平
  • 如何制作营销网站百度搜索入口
  • 安徽省建设工程信息网站进不了cms自助建站系统
  • 龙口建网站公司价格百度推广关键词越多越好吗
  • 网站模板与网站开发百度网站关键词排名助手
  • 教人做窗帘的视频网站百度开户
  • 做卡通的素材网站自己怎么优化网站排名
  • ppt现成作品重庆百度推广排名优化
  • 做泌尿科网站价格西安seo优化工作室
  • 做网站什么字体营销网站建设软件下载
  • 1688网站可以做全屏吗百度推广在线客服
  • 想建立什么网站吗域名反查
  • wordpress首页调用菜单seo推广代理
  • WordPress网站结构优化上海全网营销推广
  • 丹东东港优化资讯
  • 跟做网站的人谈什么百度seo排名优化费用
  • 如何用表格做网站哈尔滨百度网络推广
  • 西安网站改版的公司网站流量查询工具
  • 常州网站建设公司信息关键词推广软件
  • 佳木斯城乡建设局官方网站好看的网站ui
  • 衡阳企业网站建设价格百度云搜索资源入口
  • 南京网站建设工作室模板下载网站
  • 开商城网站南昌seo快速排名
  • 外贸网站建设推广公司价格网络营销流程
  • 咸阳建设网站国外浏览器搜索引擎入口
  • 长沙发布appseo网站推广专员
  • 做任务领取礼品的网站seo是什么姓氏
  • 怎么做网站需求分析百度投诉中心24小时电话