alert(a);为甚么a的值变成1?
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>new Boolean()</title> </head> <body> <script type="text/javascript"> var a= new Boolean(true); alert(typeof(a)); a= a - 0; alert(a); </script> </body> </html>
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>new Boolean()</title> </head> <body> <script type="text/javascript"> var a= new Boolean(true); alert(typeof(a)); a= a - 0; alert(a); </script> </body> </html>
2018-06-13
举报