This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1.https://github.com/senchalabs/jsduck/releases 下载rb包 | |
2.将下载的ruby包所在路径添加到全局Path变量中 | |
3.通过配置jsduck.json使用jsduck命令行执行文档生成 | |
参考: | |
{ | |
"--": "js/common", | |
"--output": "js/docs", | |
"--encoding": "gbk", | |
"--title": "京东金融M版基础库文档 vision:1.0.0" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 文件上传预览图 */ | |
function FileLoad(settings) { | |
this.input = settings.input; //input["file"] | |
this.imgView = settings.imgView;//预览图片容器 | |
this.delBtn = settings.delBtn; //删除按钮 | |
this.init(); | |
} | |
FileLoad.prototype = { | |
init: function () { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
前端自动化开发流程 | |
本地开发环境初始化(webStrom编辑器) | |
1.安装编辑器(http://www.jetbrains.com/webstorm/) | |
2.安装Node.js(http://www.nodejs.org/) | |
3.添加Node到环境变量 | |
a)控制面板->用户账户->更改我的环境变量里编辑PATH并增加系统变量NODE_PATH | |
* 要注意的是NODE_PATH的目录要指定到npm\node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var m = (new Date()+"").split(" "); | |
console.info(m) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<!-- 设置宽度为设备的宽度,默认不缩放,不允许用户缩放(即禁止缩放),在网页加载时隐藏地址栏与导航栏(ios7.1新增) --> | |
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no, minimal-ui"/> | |
<!-- 是否启动webapp功能,会删除默认的苹果工具栏和菜单栏。 --> | |
<meta name="apple-mobile-web-app-capable" content="yes"/> | |
<!-- 当启动webapp功能时,显示手机信号、时间、电池的顶部导航栏的颜色。默认值为default(白色),可以定为black(黑色)和black-translucent(灰色半透明)。这个主要是根据实际的页面设计的主体色为搭配来进行设置。 --> | |
<meta name="apple-mobile-web-app-status-bar-style" content="black"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (navigator.userAgent.indexOf('Firefox') > 0 || window.navigator.msPointerEnabled) { | |
var head = document.getElementsByTagName('head'); | |
var viewport = document.createElement('meta'); | |
viewport.name = 'viewport'; | |
viewport.id = 'viewport'; | |
viewport.content = "width=640"; | |
head.length > 0 && head[head.length - 1].appendChild(viewport); | |
$(window).resize(function () { | |
resizeWindow(); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>微信Js API Demo</title> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
<meta name="viewport" content="width=device-width,height=device-height,inital-scale=1.0;"> | |
<meta name="apple-mobile-web-app-capable" content="yes"> | |
<meta name="apple-mobile-web-app-status-bar-style" content="black"> | |
<meta name="format-detection" content="telephone=no"> | |
<style type="text/css"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 例子: | |
// (new Date()).Format("yyyy-MM-dd hh:mm:ss.S") ==> 2006-07-02 08:09:04.423 | |
// (new Date()).Format("yyyy-M-d h:m:s.S") ==> 2006-7-2 8:9:4.18 | |
Date.prototype.Format = function(fmt) | |
{ //author: meizz | |
var o = { | |
"M+" : this.getMonth()+1, //月份 | |
"d+" : this.getDate(), //日 | |
"h+" : this.getHours(), //小时 |