需要在https://code.google.com/p/crypto-js/下载工具包 <script type="text/javascript" s…
jQuery("#gotop").css(’display’,’none’);jQuery(window).sc…
// 校验手机号 1开头11位数字 function checkMobile(str) { var re = /^1\d{10}$/ if(str.length==0){ $(&q…
function checkSubmit(){ var startDate=$("#startDate").val(); var endDate=$("…
javascript返回某个元素在数组中的索引值的indexOf方法–兼容所有浏览器 在现在代浏览器中判断一个元素在不在一个数组中,咱们可以用Array对象的indexOf()方法…
<html xmlns="http://www.w3.org/1999/xhtml"> <head id="Head1" …
1.实时显示可输入的字数(字节数) 2.两种限制方式(长度、字节数) 3.中文输入法下可正常使用,无BUG 4.同一页面可以使用多个,相互不干扰 limit.js代码: funct…
String.prototype.trim = function(){ return this.replace(/(^[\\s]*)|([\\s]*$)/g, "&quo…
//处理键盘事件 禁止后退键(Backspace)密码或单行、多行文本框除外 function forbidBackSpace(e) { var ev = e || window.…
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type&quo…
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://w…
一个段小代码,同一个网站针对移动端查看和桌面端查看跳转不同的页面。 首先加载jQuery文件。 $(function(){ var MobileUA = (function() {…