摘要:https://blog.csdn.net/stopllL/article/details/70118132 https://www.cnblogs.com/thonrt/p/5978082.html
阅读全文
摘要:function is_weixin() { var ua = window.navigator.userAgent.toLowerCase(); if (ua.match(/MicroMessenger/i) == 'micromessenger') { $("#rs").text("微信浏览器"); } else { $("#...
阅读全文
摘要://防止默认就是打开f12的 if(window.console&&window.console.log){ window.location.href = 'about:blank'; //console.log("打开了控制台")}
阅读全文
摘要:通过 3 张图和 1 张表格,轻松区别 Javascript Event 对象中的offsetX, clientX, pageX, screenX, layerX, x等属性。 一、测试代码如下: [html] view plain copy <!DOCTYPE HTML> <html lang="
阅读全文
摘要:<!DOCTYPE html><html><head> <title>Demo</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <script type="text/javascript" sr
阅读全文
摘要:hello,你好! /***hello,你好!**/
阅读全文
摘要:if ( $("#someID").length > 0 ) { $("#someID").text("hi"); }
阅读全文
摘要:$(document).scroll(function(){ var bheight = $(document).height();//获取窗口高度 var sheight = $("body")[0].scrollHeight;//获取滚动条高度,[0]是为了把jq对象转化为js对象 var stop = $("body").scrollTop...
阅读全文
摘要:js需要把时间戳转为为普通格式,一般的情况下可能用不到的, 下面先来看第一种吧 第二种 正则替换 function getLocalTime(nS) { return new Date(parseInt(nS) * 1000).toLocaleString().replace(/年|月/g, "-"
阅读全文
摘要:文档:http://bootstrap-datepicker.readthedocs.io/en/latest/events.html
阅读全文
摘要:bootstrapvalidator源码:https://github.com/nghuuphuoc/bootstrapvalidator 或者 http://www.jq22.com/jquery-info522 boostrapvalidator api:http://bv.doc.javake
阅读全文
摘要:/** * 过滤 * */ var filter = { 'filterObj':'table.appLogList tbody tr', 'searchObj':'.local-search select', 'search...
阅读全文
摘要:/** * 延时执行 * @type */ var delayAction = { 'endMark':'', 'startMark':'', 'end':function(){ ...
阅读全文
摘要:链接:http://www.jq22.com/jquery-info2082 实例:
阅读全文
摘要:function StringBuffer () { this._strings_ = new Array(); } StringBuffer.prototype.append = function(str) { this._strings_.push(str); }; StringBuffer.prototype.toString = function() { return t...
阅读全文
摘要:使用预定义对象只是面向对象语言的能力的一部分,它真正强大之处在于能够创建自己专用的类和对象。 ECMAScript 拥有很多创建对象或类的方法。 1.工厂方式(函数返回对象)、 2.构造函数方式(函数中添加对象属性和方法) 3.原型方式prototype (相当于引用 其中的添加的属性和方法都是共享
阅读全文
摘要:bootstrap-datepicker 是一个非常优秀的时间选择插件,默认是英文显示日期的,通过下面几个小修改让其支持默认中文 1、首先将 bootstrap-datepicker.js 另存为 utf-8 格式保存 2、增加 cn 语言选项 红色部分为增加的语言选项 3、修改默认参数,默认语言为
阅读全文
摘要:电脑端: 使用mousedown mouseup mouseout 移动端: touchstart touchend
阅读全文