我想知道为什么以下代码在Google Chrome中不起作用:
// creates a xss console log var cl = ( typeof( console ) != 'undefined' ) ? console.log : alert; cl('teste');
输出:未捕获TypeError:非法调用
谢谢.
javascript google-chrome exception
exception ×1
google-chrome ×1
javascript ×1