木子屋 Dnawo's BLOG

2019-11 归档

共 24 篇

Don’t Use jquery-latest.js[转]

Earlier this week the jQuery CDN had an issue that made the jquery-latest.js and jquery-latest.min.js files unavailable for a few hours in some geographical areas. (This wasn’t a problem with the CDN itself, but with the repository that provides files for the CDN.) While we always hope to have 100% uptime, this particular outage emphasized the number of production sites following the antipattern of using this file. So let’s be clear: Don’t use jquery-latest.js on a production site. We know that jquery-latest.js is abused because of the CDN statistics showing it’s the most popular file. That wouldn’t be the case if it was only being used by developers to make a local copy. The jquery-latest.js and jquery-latest.min.js files were meant to provide a simple way to download the latest released version of jQuery core. Instead, some developers include this version directly in their production sites, exposing users to the risk of a broken site each time a new version of jQuery is released. The team tries to minimize those risks, of course, but the jQuery ecosystem is so large that we can’t possibly check it all before making a new release. To mitigate the risk of “breaking the web”, the jQuery team decided back in 2013 that jquery-latest.js could not be upgraded to the 2.0 branch even though that is technically the latest version. There would just be too many sites that would mysteriously stop working with older versions of Internet Explorer, and many of those sites may not be maintained today.…

本地调试WEB页面被植入CSS(BAIDU_DSPUI_FLOWBAR)解决方法

本地调试WEB页面,浏览器中查看源代码时意外发现被植入了一段CSS: 运营商广告植入?可我这是本地调试,不可能的。仔细看CSS,似乎是要屏蔽页面baidu、google广告的,想起来机子上安装了阿呆猫广告拦截软件,会不会和它有关? 退出软件,刷新页面,植入的CSS没了^_^ PS:然后,我又打开软件,随机看了几个外网页面源代码,都没发段这段CSS,好奇葩。

Bootstrap Table服务器端分页使用示例

Bootstrap Table服务器端分页主要通过设置data-pagination和data-side-pagination两个属性来实现: data_json.asp返回格式: 1、怎么修改远程数据请求方法? 当method="get"(默认)时:data_json.asp?order=asc&offset=0&limit=10 当method="post"时:{"order":"asc","offset":0,"limit":10} 2、怎么添加服务器端查询参数? 查询参数:data_json.asp?order=asc&offset=0&limit=10&domain=mzwu.com&keyword=abc…

Bootstrap Table基本使用示例

Bootstrap Table是一款基于 Bootstrap 的 jQuery 表格插件,通过简单的设置,就可以拥有强大的单选、多选、排序、分页,以及编辑、导出、过滤(扩展)等等的功能,一个基本的Bootstrap Table页面模板如下: 一、使用HTML属性设置Bootstrap Table 1、通过data-toggle="table"设置普通表 2、通过data-url设置使用远程URL数据 data1.json: 3、通过data-pagination、data-search、data-sortable为表格增加分页、搜索、排序功能 PS:必须table和th的data-sortable都为true,th的排序才会生效。…

插排火线零线都带电故障解决

插排没电,用电笔测发现火线零线都带电,这种情况通常是零线断了的缘故,拆开插排发现零线接头松了,接上,故障解决。