xwp 7 JavaScript语法标准 - nuanxin1111/react GitHub Wiki

ES5规范

https://github.com/airbnb/javascript/tree/master/es5

ES6(既ES2015)入门

http://wiki.jikexueyuan.com/project/es6/let.html
http://gank.io/post/564151c1f1df1210001c9161

ES6规范

https://github.com/airbnb/javascript

ecma官方

http://www.ecma-international.org/ecma-262/6.0/index.html

React规范

https://github.com/airbnb/javascript/tree/master/react

html与css规范

class和id用小写字母,并且class用“-”分割命名,id用用“_”分割命名因为很多浏览器会把id直接添加到全局scope,容易和js里起的变量名冲突,但如果id里面带有下划线,就只能像window['xxx_xx']这样访问,而不能直接当作变量名访问,就不会和js里的变量名冲突了。

<div id="s_lm_wrap" class="s-isindex-wrap">