W3School TIY Editor
W3School 在线教程
改变方向
暗黑模式
运行代码
<!DOCTYPE html> <html> <body> <p>删除注释(在行的开头)以测试每种情况:</p> <p id="demo"></p> <script> var x; //x = (0 == ""); // true //x = (1 == "1"); // true //x = (1 == true); // true //x = (0 === ""); // false //x = (1 === "1"); // false //x = (1 === true); // false document.getElementById("demo").innerHTML = x; </script> </body> </html>