打开开发者工具(F12)后,可以在Console窗口调试javascript代码
在Chrome浏览器中,可以在Sources窗口中通过Create new snippet来新建一个脚本文件,点击Run后就可以执行代码