esitecms.com
面向对象:ES5与ES6定义类 – skiny | 前端攻城獅
http://www.esitecms.com/archives/javascript-class
Learn once, write anywhere. Var Person = (function () { function Person(name) { this.name = name; } Person.prototype.sayHello = function () { window.alert(My name is this.name .); }; return Person; })();. Class Person{ constructor(name){ this.name=name; } sayHello(){ window.alert(My name is this.name .); } }.
esitecms.com
javascript中的this指向判断总结 – skiny | 前端攻城獅
http://www.esitecms.com/archives/javascript-this
Learn once, write anywhere. 当函数直接被调用时 this 指向 window(在严格模式中指向 undefined). Function test(){ var str = 123456; function handler(){ console.log(this); return true; } handler(); } test();. 方法 otest(); / 函数 test();.
esitecms.com
Markdown 编辑器语法指南 – skiny | 前端攻城獅
http://www.esitecms.com/archives/editor-markdown
Learn once, write anywhere. Javascript@ $(document).ready(function () { alert(hello world); }); @` `@. Actionscript, apache, bash, clojure, cmake, coffeescript, cpp, cs, css, d, delphi, django, erlang, go, haskell, html, http, ini, java, javascript, json, lisp, lua, markdown, matlab, nginx, objectivec, perl, php, python, r, ruby, scala, smalltalk, sql, tex, vbscript, xml. Yield from range(x, 0, -1)! 标题1 @= = = @ 标题2 @- - -@ @# @ 大标题 @# @ @# #@ 小标题 @# #@. 文字链接 @[链接名称](http:/ 链接网址)@ 网址链接 @ http:/ 链接网址 @.
esitecms.com
CSS3中和动画有关的属性transform、transition 和 animation – skiny | 前端攻城獅
http://www.esitecms.com/archives/css3-transform-transition-animation
Learn once, write anywhere. 来实现页面中的一些样式转化,这篇文章会对这几个属性做简单的介绍,然后比较一下 CSS3 动画和 JS 动画哪个性能更好。 Transition, transform 和 animation 介绍. Transition transition-property transition-duration transition-timing- function. Transition-delay [, .]. Ease linear ease-in ease-out ease-in-out cubic-bezier 自定义时间曲线. DEMO: http:/ codepen.io/CodingMonkeyzh/pen/ZGBRVe. Transform 分为2D 和 3D,这里暂时只介绍比较常用的2D transform,其主要包含以下几种变换 旋转rotate、扭曲skew、缩放scale和移动translate以及矩阵变形matrix. Rotate scale skew translate matrix;. Scale(0.5, 2).
esitecms.com
ES5和ES6中对于继承的实现方法 – skiny | 前端攻城獅
http://www.esitecms.com/archives/javascript-extends
Learn once, write anywhere. Function Super(){ this.flag = true; } Super.prototype.getFlag = function(){ return this.flag; / 继承方法 } function Sub(){ this.subFlag = flase Super.call(this) / 继承属性 } Sub.prototype = new Super; var obj = new Sub(); Super.prototype.getSubFlag = function(){ return this.flag; }. 这里有个小问题,Sub.prototype = new Super; 会导致Sub.prototype的constructor指向Super;. Subprototype.constructor = Sub;. 第二条继承链理解起来没有什么问题,对应到ES5中的A.prototype = new B;A.prototype作为B构造的实例,指向构造函数B的原型B.prototype,.
esitecms.com
腾讯经纬度如何转百度经纬度 – skiny | 前端攻城獅
http://www.esitecms.com/archives/gcj02_to_bd09
Learn once, write anywhere. Http:/ api.map.baidu.com/geoconv/v1/? Coords=104.0555,30.66138&from=1&to=5&ak=key秘钥. Http:/ lbsyun.baidu.com/index.php?
esitecms.com
tags – es6 – skiny | 前端攻城獅
http://www.esitecms.com/tags/es6
Learn once, write anywhere. 定义类ES5var Person = (function () { function P. 谈谈 ES6 的 Promise 对象. 一般会这样去写 $.ajax({ url: '.', .
esitecms.com
linux系统下配置L2tp Vpn – skiny | 前端攻城獅
http://www.esitecms.com/archives/linux-vpn
Learn once, write anywhere. Linux Centos 下配置L2tp Vpn。 Yum install -y make gcc gmp-devel xmlto bison flex xmlto libpcap-devel lsof vim-enhanced man. Yum install openswan ppp xl2tpd. 1 编辑 /etc/ipsec.conf. Vi /etc/ipsec.secrets include /etc/ipsec.d/*.secrets 114.114.114.114 %any: PSK YourPsk # #YourPsk为预共享密钥。 3 修改/添加 /etc/sysctl.conf并生效. Vim /etc/sysctl.conf 在/etc/sysctl.conf的末尾加上如下内容。 Netipv4.ip forward = 1 net.ipv4.conf.default.rp filter = 0 net.ipv4.conf.all.send redir...Iptables -t nat -A POSTROUTING -m...
esitecms.com
微信小程序如何获取get参数 – skiny | 前端攻城獅
http://www.esitecms.com/archives/wxapp-navigator
Learn once, write anywhere. Uid=skiny 详情 / navigator. Page({ data: , onLoad: function (options) { let this=this; console.log(options.uid); } });.
esitecms.com
tags – webpack – skiny | 前端攻城獅
http://www.esitecms.com/tags/webpack
Learn once, write anywhere. 在 CSS 预编译器之后 PostCSS. 提到css预编译器 css preprocessor ,你可能想到Sass[]以及[Stylus][]。