如何让一段js只在chrome浏览器下运行如题[解决办法]
if (window.navigator.userAgent.indexOf('Chrome') > -1) { alert('Chrome!');}else alert('Not Chrome');