写代码就像写字一样,好看的大家都喜欢 下面是几个不错的代码风格指南 https://github.com/airbnb/javascript/blob/es5-deprecated/es5/README.md airbnb的https://google.github.io/styleguide/javascriptguide.xml google的https://github.com/fex-team/styleguide/blob/master/javascript.md 百度的