node_modules/html-webpack-plugin/index.js 搜索 postProcessHtml 修改代码增加如下: if (assetTags && assetTags.body && assetTags.body.length) { for (var index = 0; index < assetTags.body.length; index++) { var element = assetTags.body[index]; if (el…
/* * 名称 :移动端响应式框架 * 作者 :白树 http://peunzhang.cnblogs.com * 版本 :v2.1 * 日期 :2015.10.13 * 兼容 :ios 5+.android 2.3.5+.winphone 8+ */ function pageResponse(d){var c=navigator.userAgent,o=c.match(/Windows Phone ([\d.]+)/),e=c.match(/(Android);?[\s\/]+([\d.]+…
<script language="JavaScript">function myrefresh(){window.location.reload();}setTimeout('myrefresh()',1000); //指定1秒刷新一次</script> 页面自动刷新代码大全1) 自动刷新页面 在 <body> 与 </body> 之间加入: <META http-equiv=refresh content=”10;url=../…
自动刷新页面的实现方法总结: 1) <meta http-equiv="refresh"content="10;url=跳转的页面"> 10表示间隔10秒刷新一次 2) <script language=''javascript''> window.location.reload(true); </script> 如果是你要刷新某一个iframe就把window给换成frame的名字或ID号 3) <script langu…
/** * 缩略图 * * @param bool isScaling 是否缩放 * @param int width 宽度 * @param int height 高度 * @param string loadindPic 表示“正在加载中”的图片地址 */ jQuery.fn.LoadImage = function (isScaling, width, height, loadindPic) { if (loadindPic == null) { loadindPic = "../imag…
<script type="text/javascript"> //刷新页面 if(location.href.indexOf("refresh=1") === -1) { setTimeout(function() { location = location.href + "?refresh=1" },1) } </script> 或者 <script type="text/javascript"…
在这里做一下简单记录,防止自己忘记. 下面是实现自动点击打开链接的主要函数,功能不再细说,防止太多人滥用,有心的人一看就会明白,改把改把就是一个邪恶的程序: function randopen() { var len = $(“#urllist option”).length; var num = 10; for(i=1; i<=num; i++) { randnum = Math.random()*len; zn = Math.round(randnum); u = $(“#”+zn).val…
1.页面效果图: 演示链接地址:http://www.nxl123.cn/bokeyuan/meiTuanDemo_walk/ 2.核心代码 walk.html: <ons-page id="walk" ng-controller="walkController"> <!--toolbar开始--> <ons-toolbar> <div class="left">城市头条</div> &…
作为与用户联系最为密切的前端开发者,用户体验是最值得关注的问题.关于页面loading状态的展示,主流的主要有loading图和进度条两种.除此之外,越来越多的APP采用了“骨架屏”的方式去展示未加载内容,给予了用户焕然一新的体验.随着SPA在前端界的逐渐流行,首屏加载的问题也在困扰着开发者们.那么有没有一个办法,也能让SPA用上骨架屏呢?这就是这篇文章将要探讨的问题. 一.何为骨架屏 简单来说,骨架屏就是在页面内容未加载完成的时候,先使用一些图形进行占位,待内容加载完成之后再把它替换掉. 这个…
第一步:初始化项目 1.npm init 2. package name: (webpack+vue) webpackvue version: (1.0.0) description: this is webpack Vue demo entry point: (webpack.config.js) index.js test command: git repository: keywords: author: alexia license: (ISC) About to write to D:…