看世界
 
昨日:篇  今日:篇   总帖:篇   会员:
今日:0
文章:0
今日:0
文章:5
IT
今日:0
文章:57
今日:0    总帖:65
admin
27
文件
IT 0 0 37天前
admin
20
文件
IT 0 0 37天前
admin
32
您需要登录并回复后才可以查看该文章内容
IT 0 0 43天前
admin
45
您需要登录并回复后才可以查看该文章内容
IT 0 0 44天前
admin
40
您需要登录并回复后才可以查看该文章内容
IT 0 0 44天前
admin
29
login.php  register.php上传至 百度云 >> 代码
IT 0 0 44天前
admin
64
表单验证   
<form action="" method="POST" role="form" id="form-test"> <legend>Form title</legend> <div class="form-group"> <label for="">label</label> <input type="text" class="form-control" id="" name="text" placeholder="Input field"> </div> <button id="btn-test" class="btn btn-primary">Submit</button> </form> $(function () { $("#form-test").bootstrapValidator({ live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证 excluded: [':disabled', ':hidden', ':not(:visible)'],//排除无需验证的控件,比如被禁用的或者被隐藏的 submitButtons: '#btn-test',//指定提交按钮,如果验证失败则变成disabled,但我没试成功,反而加了这句话非submit按钮也会提交到action指定页面 message: '通用的验证失败消息',//好像从来没出现过 feedbackIcons: {//根据验证结果显示的各种图标 valid: 'glyphicon glyphicon-ok', invalid: 'glyphicon glyphicon-remove', validating: 'glyphicon glyphicon-refresh' }, fields: { text: { validators: { notEmpty: {//检测非空,radio也可用 message: '文本框必须输入' }, stringLength: {//检测长度 min: 6, max: 30, message: '长度必须在6-30之间' }, regexp: {//正则验证 regexp: /^[a-zA-Z0-9_\.]+$/, message: '所输入的字符不符要求' }, remote: {//将内容发送至指定页面验证,返回验证结果,比如查询用户名是否存在 url: '指定页面', message: 'The username is not available' }, different: {//与指定文本框比较内容相同 field: '指定文本框name', message: '不能与指定文本框内容相同' }, emailAddress: {//验证email地址 message: '不是正确的email地址' }, identical: {//与指定控件内容比较是否相同,比如两次密码不一致 field: 'confirmPassword',//指定控件name message: '输入的内容不一致' }, date: {//验证指定的日期格式 format: 'YYYY/MM/DD', message: '日期格式不正确' }, choice: {//check控件选择的数量 min: 2, max: 4, message: '必须选择2-4个选项' } } } } }); $("#btn-test").click(function () {//非submit按钮点击后进行验证,如果是submit则无需此句直接验证 $("#form-test").bootstrapValidator('validate');//提交验证 if ($("#form-test").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码 alert("yes");//验证成功后的操作,如ajax } }); });regexp: /^([0-9A-Za-z\-_\.]+)@([0-9a-z]+\.[a-z]{2,3}(\.[a-z]{2})?)$/,
IT 0 0 44天前
admin
30
验证密码   
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="zh" xml:lang="zh"> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> <title>电子邮件地址验证程序</title> <script language="javascript" type="text/javascript"> //<![CDATA[ function check( email_address ) { var regex = /^([0-9A-Za-z\-_\.]{5,10})/g; if ( regex.test( email_address ) ) { var user_name = email_address.replace( regex, "$1" ); var alert_string = "您输入的密码合法"; window.alert( alert_string ); return true; } else { window.alert( "您输入的密码不合法" ); return false; } } //]]> </script> </head> <body style="text-align: center;"> <h1>电子邮件地址验证程序</h1> 请输入电子邮件地址:<input id="email_address" type="text" style="width: 300px;" /><br /> <input type="button" value="验证密码" onclick="return check(document.getElementById('email_address').value);" /> </body> </html>
IT 0 0 45天前
admin
26
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="zh" xml:lang="zh"> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> <title>电子邮件地址验证程序</title> <script language="javascript" type="text/javascript"> //<![CDATA[ function check( email_address ) { var regex = /^([0-9A-Za-z\-_\.]+)@([0-9a-z]+\.[a-z]{2,3}(\.[a-z]{2})?)$/g; if ( regex.test( email_address ) ) { var user_name = email_address.replace( regex, "$1" ); var domain_name = email_address.replace( regex, "$2" ); var alert_string = "您输入的电子邮件地址合法\n\n"; alert_string += "用户名:" + user_name + "\n"; alert_string += "域名:" + domain_name; window.alert( alert_string ); return true; } else { window.alert( "您输入的电子邮件地址不合法" ); return false; } } //]]> </script> </head> <body style="text-align: center;"> <h1>电子邮件地址验证程序</h1> 请输入电子邮件地址:<input id="email_address" type="text" style="width: 300px;" /><br /> <input type="button" value="验证电子邮件地址" onclick="return check(document.getElementById('email_address').value);" /> </body> </html>
IT 0 0 45天前
admin
27
表单   
<!DOCTYPE html><html lang="zh-CN">  <head>    <meta charset="utf-8">    <meta http-equiv="X-UA-Compatible" content="IE=edge">    <meta name="viewport" content="width=device-width, initial-scale=1">    <!-- 上述3个meta标签*必须*放在最前面,任何其他内容都*必须*跟随其后! --><title><?=$bqsr['titleurl']?>干洗网::干洗机|干洗设备|水洗机|烘干机|干洗机|干洗机价格|干洗机维修|干洗加盟|干洗机|干洗机价格|干洗机回收|收购干洗机</title><meta name="keywords" content="干洗机,干洗机,成都干洗机,成都干洗设备,干洗设备,水洗机,干洗设备,水洗设备,收购干洗机,回收干洗机,干洗机价格,水洗机价格">    <meta name="description" content="<?=$public_r[sitename]?>干洗网是专注于干洗设备,水洗设备的价格发布、产品开发与二次利用,<?=$bqsr['titleurl']?>干洗机是目前国内信息量最大的干洗机,水洗设备行业网站。通过多年的不断创新与完善,使网站系统集干洗机销售、干洗技术培训、洗衣耗材的配送与洗涤材料的开发、干洗设备、水洗设备的转让、干洗机出售信息发布平台。目前网站已经广泛应用在国内众多的酒店、宾馆、学校、干洗店、水洗厂等,网站的流量位居同类型网站之首,为广大的用户带来了可观的效益。" />    <meta name="author" content="maoguo <maoguo@2swz.com>"><link rel="icon" href="/favicon.ico">     <!-- Bootstrap core CSS -->    <link href="/css/bootstrap.min.css" rel="stylesheet">     <link href="/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">        <!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->    <!-- Custom styles for this template -->     <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->    <!--[if lt IE 9]>    <![endif]--></head>  <body>  <div class="container"> <h1>用户注册</h1><form class="form-horizontal">  <div class="form-group">             <label for="" class="col-xs-4 col-md-2 control-label">user</label>                <div class="input-group col-xs-8 col-md-10">                        <div class="input-group-addon"><i class="fa fa-user fa-fw"></i></div>                          <input type="text" class="form-control" id="exampleInputAmount" placeholder="user">                          <div class="input-group-addon">*</div>              </div>   </div>  <div class="form-group">             <label for="" class="col-xs-4 col-md-2 control-label">Password</label>                <div class="input-group col-xs-8 col-md-10">                        <div class="input-group-addon"><i class="fa fa-key fa-fw"></i></div>                          <input type="Password" class="form-control" id="exampleInputAmount" placeholder="Password">                          <div class="input-group-addon">*</div>              </div>   </div><div class="form-group">             <label for="" class="col-xs-4 col-md-2 control-label">Password</label>                <div class="input-group col-xs-8 col-md-10">                        <div class="input-group-addon"><i class="fa fa-key fa-fw"></i></div>                          <input type="Password" class="form-control" id="exampleInputAmount" placeholder="Password">                          <div class="input-group-addon">*</div>              </div>   </div><div class="form-group">             <label for="" class="col-xs-4 col-md-2 control-label">Email</label>                <div class="input-group col-xs-8 col-md-10">                        <div class="input-group-addon"><i class="fa fa-envelope fa-fw"></i></div>                          <input type="Email" class="form-control" id="exampleInputAmount" placeholder="Email">                          <div class="input-group-addon">*</div>              </div>   </div><hr><div class="form-group">    <div class="col-sm-offset-2 col-sm-10">      <div class="checkbox">        <label>          <input type="checkbox"> Remember me        </label>      </div>    </div>  </div>  <div class="form-group">    <div class="col-sm-offset-2 col-sm-10">      <button type="submit" class="btn btn-default">Sign in</button>    </div>  </div></form>   </div><script src="/js/jquery.min.js"></script><script src="/js/bootstrap.min.js"></script></body></html>
IT 0 0 45天前
LOOK官方站 联系站长
Powered by Look博客