W3School TIY Editor
W3School 在线教程
改变方向
暗黑模式
运行代码
<!DOCTYPE html> <html> <body> <p>typeof 运算符返回变量或表达式的类型。</p> <p id="demo"></p> <script> document.getElementById("demo").innerHTML = typeof "" + "<br>" + typeof "Bill" + "<br>" + typeof "Bill Gates" + "<br>" + typeof 0 + "<br>" + typeof 314 + "<br>" + typeof 3.14 + "<br>" + typeof (3.14); </script> </body> </html>