This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* | |
* @descrition: 测试给定的参数是否全部为中文字符,如"中test"不会通过 。 | |
* @param->str : 传入的参数,类型为字符串。 | |
* @return : true表示全部为中文,false为不全是中文,或没有中文。 | |
* | |
*/ | |
var isChinese = function (str) { | |
var pattern = /^[\u0391-\uFFE5]+$/g; | |
return pattern.test(str); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* | |
* @Dependence : https://gist.github.com/hehongwei44/3e167cfcda47d4c8051a#file-extendstringprototype-js | |
* @description : 判断输入的参数是否为空 | |
* @return : true表示为输入参数为空 | |
* | |
*/ | |
function isEmpty (str) { | |
//空引用 空字符串 空输入 | |
return str == null || typeof str == "undefined" || str.trim() == "" ? true : false; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* | |
* @descrition: 这个函数对输入的参数检查时候是合格的身份证号码,其身份证有效性无法判断。检测的颗粒度可以定制。 | |
* @param->str : 待验证的参数 | |
* @return : true是合格的身份证 false为不合法的身份证 | |
* | |
*/ | |
function checkIdCard (num) { | |
num = num.toUpperCase(); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @descrition:判断输入的参数是否是个合格的固定电话号码。 | |
* @param:str->待验证的固定电话号码。 | |
* @return : true表示验证合格。 | |
* | |
**/ | |
var isfixedphone = function(str) { | |
/** | |
* | |
* @desctition:规则->区号3-4位,号码7-8位,可以有分机号,分机号为3-4为,格式如下:"0775-85333333-123" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* | |
* @descrition:判断是否是合理的IP地址 | |
* @param:str->待验证的IP地址 | |
* @return :true合理的IP地址 | |
* | |
*/ | |
var isIP = function (str) { | |
var pattern = /^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
input::-ms-clear { display: none; } //去掉input中的叉叉 | |
input::-ms-reveal { display: none; } //去掉密码框中的小眼睛 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* @link :http://browserhacks.com/ | |
* IE篇 | |
*/ | |
var ie6=!-[1,]&&!window.XMLHttpRequest; //IE6为true,其他都为false | |
var isIE = !!window.ActiveXObject; //ie6-10都为true, ie11为false | |
/*返回IE6-9的版本号*/ | |
var _IE = (function(){ | |
var v = 3, div = document.createElement('div'), all = div.getElementsByTagName('i'); | |
while ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>无标题文档</title> | |
<style> | |
*{margin:0;padding:0;} | |
.clearfix:before, .clearfix:after {content:"";display:table;} | |
.clearfix:after{clear:both;} | |
.clearfix{*zoom:1;/*ie6,7*/} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//html 结构 | |
<div class="tabBox"> | |
<ul class="visiter"> | |
<li><span class="firstSpan">第一周幸运用户</span><span>18601583176</span><span>巴西世界杯之旅6日游</span></li> | |
<li><span class="firstSpan">第二周幸运用户</span><span>18601583176</span><span>巴西世界杯之旅6日游</span></li> | |
<li><span class="firstSpan">第三周幸运用户</span><span>18601583176</span><span>巴西世界杯之旅6日游</span></li> | |
<li><span class="firstSpan">第四周幸运用户</span><span>18601583176</span><span>巴西世界杯之旅6日游</span></li> | |
<li><span class="firstSpan">第五周幸运用户</span><span>18601583176</span><span>巴西世界杯之旅6日游</span></li> | |
<li><span class="firstSpan">第六周幸运用户</span><span>18601583176</span><span>巴西世界杯之旅6日游</span></li> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*! Copyright (c) 2013 Brandon Aaron (http://brandon.aaron.sh) | |
* Licensed under the MIT License (LICENSE.txt). | |
* | |
* Version: 3.1.12 | |
* github: https://github.com/brandonaaron/jquery-mousewheel | |
* Requires: jQuery 1.2.2+ | |
*/ | |
(function (factory) { | |
if ( typeof define === 'function' && define.amd ) { |