webstorm10常用配置
摘要:1.配置tab操作为4个空格 File->Settings->Editor->Code Style->JavaScript->Tabs and Indents 默认为4个空格,不要选中"Use tab character" 2.配置每行最长80个字符 File->Settings->Editor->
阅读全文
posted @
2016-04-27 17:02
翻页工
阅读(841)
推荐(0)
npm包管理工具常用命令
摘要:1.查看npm包列表 npm ls (-g) -depth 0 2.调试自己的npm包 npm install -g node-inspector node-debug xxx.js eg:调试gulp任务default node-debug .\node_modules\gulp\bin\gulp
阅读全文
posted @
2016-04-26 10:55
翻页工
阅读(727)
推荐(0)
将HTML从JavaScript中抽离(源自:编写可维护的JavaScript)
摘要:1.方法一:从服务器加载(ajax) 结论:需特别注意XSS漏洞 2.方法二:简单客户端模版 (1)在HTML注释中包含模版,注释是和元素及文本一样的DOM节点 结论:非常不推荐,因为注释必须挨着<ul id="mylist">,如果有空格或者回车,firstChild就不是该li注释了。 (2)使
阅读全文
posted @
2016-04-01 11:24
翻页工
阅读(569)
推荐(0)