Webcourse/05-CSS进阶/02-JS的小知识.md
2018-01-26 15:18:56 +08:00

62 lines
766 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

JS的小知识.md
### 方法的注释
方法写完之后,我们在方法的前面输入`/**`,然后回车,会发现,注释的格式会自动补齐。
### 断点调试
1先让程序运行一遍。
2f12弹出代码调试工具
3打断点
![](http://img.smyhvae.com/20180124_2035.png)
然后刷新页面。
4一步步调试每点击一次执行一步
![](http://img.smyhvae.com/20180124_2036.png)
5监视变量
当然,也可以添加变量或者表达式到监视窗口。操作如下:
![](http://img.smyhvae.com/20180124_2037.png)
上图中选择变量或表达式然后右键add to watch.
然后监视窗口:
![](http://img.smyhvae.com/20180124_2038.png)