javascript === 与 ==
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>test === </title> <script> /* Identity operators: ===, !== These operators behave the same as the equality operators, except that no type conversion is done. If the types of both expressions are not the same, these expressions always return false. */ window.onload = function () { //if(1 == '1'){ // true if(1 === '1'){ // false alert('yes') } else{ alert('no') } } </script> </head> <body> </body> </html>