特殊的Javascript非法调用类型错误

特殊的Javascript非法调用类型错误,javascript,google-chrome,error-handling,runtime-error,Javascript,Google Chrome,Error Handling,Runtime Error,因此,下面的例子运行得很好 document.write(“”); 试一试{ document.writeln(document.querySelector); document.writeln(“example.indexOf”); (功能(x){ var f=x; document.writeln(f+”,\n\t“+x.toString()); })(“示例”.indexOf); (函数(x){document.writeln)( typeof x==typeof document.qu

因此,下面的例子运行得很好

document.write(“”);
试一试{
document.writeln(document.querySelector);
document.writeln(“example.indexOf”);
(功能(x){
var f=x;
document.writeln(f+”,\n\t“+x.toString());
})(“示例”.indexOf);
(函数(x){document.writeln)(
typeof x==typeof document.querySelector
)})(document.querySelector);
}catch(e){document.writeln(
“+e+”
) };
文件。填写(“”)这可能有帮助:或者这个:这可能有帮助:或者这个: