随笔分类 -  jQuery/JS

摘要:原作者github地址:https://github.com/gbirke/jquery_pagination 在这基础上加入了跳转到指定页。 修改后的jquery.pagination.js /** * This jQuery plugin displays pagination links in 阅读全文
posted @ 2017-08-02 20:38 Vincent-Li 阅读(1456) 评论(0) 推荐(0)
摘要:当登录的Session失效后,采用ajax请求数据时会没有反应,这时候应该自动跳转到登录页面,让用户重新登录。 全局配置以下可实现 阅读全文
posted @ 2017-04-11 16:54 Vincent-Li 阅读(530) 评论(0) 推荐(0)
摘要:在使用jQuery.when()调用外部声明方法时,如果方法不为Deferred(延时)对象,则done会立即执行,所有需要在调用的方法声明一个var deferred = $.Deferred();以达到执行完调用的方法后再执行done。 阅读全文
posted @ 2017-01-18 17:00 Vincent-Li 阅读(825) 评论(0) 推荐(0)
摘要:checkbox全选/反选 全选/反选 阅读全文
posted @ 2016-06-23 15:16 Vincent-Li 阅读(182) 评论(0) 推荐(0)
摘要:1.导入jquery.js文件:<script type="text/javascript" src="js/jquery.js"></script> 2.导入百度地图JS: <script type="text/javascript" src="http://api.map.baidu.com/a 阅读全文
posted @ 2016-06-01 16:13 Vincent-Li 阅读(870) 评论(0) 推荐(0)
摘要:RegExp对象 方法 描述 exec 检索字符中是正则表达式的匹配,返回找到的值,并确定其位置 test 检索字符中指定的值,返回true或false test()方法 语法: 正则表达式对象实例.test(字符串) 例: var str="my name"; var reg=/name/; va 阅读全文
posted @ 2013-04-03 14:32 Vincent-Li 阅读(170) 评论(0) 推荐(0)