PS: I prefer Ctrl+Shift+/ for toggling block comments because Ctrl+/ is shortcut for toggling line comments so it’s naturally easier to remember. To do so, just click on the settings icon in the bottom left of the screen and click ‘Keyboard Shortcuts’ and find “toggle block…”. Then click and enter your desired combination.
最简单的,给 CSS 加上 cursor: pointer; 停止委托,直接给 #btn 绑定事件处理器; 给 div 元素加上 onclick=’void(0);’; 将 div 换成其它不受该 bug 特性影响的元素,比如 a、button 等。
有效 json
A comment first. The question was about not using try/catch. If you do not mind to use it, read the answer below. Here we just check a JSON string using a regexp, and it will work in most cases, not all cases.
autoindex_exact_size; – This directive specifies whether Nginx should display the exact file sizes of the output in the directory index or simply round to the nearest KB, MB, or GB. This directive has 2 options: on | off.
autoindex_format; – This directive specifies what format the Nginx index listing should be outputted to. This directive has 4 options: html | xml | json | jsonp.
autoindex_localtime; – This directive specifies whether the times for the directory listing should be outputted to local time or UTC. This directive has 2 options: on | off.