== non-strict comparison operator
//可以比较两个参数,即便是不同的类型
Example:
var a = "1";
alert(a == 1); // true
alert(a == "1"); //true
=== strict comparison operator
//可以比较两个参数,但必须是相同的类型,否则返回false
Example:
var a = "1";
alert(a === 1);// false;
alert(a === "1");//true;
any more??????????????????????
but,Boolean with String is different situation.
//不知作何解释,测试不行 == 与 === 结果是一样的
var a = "true";
alert(a ==/=== true);//false;
alert(a ==/=== 1); //false;
alert(a ==/=== "true");//true;
//但是这样就行,JavaScript不能强制转换 Boolean类型
var a = true;
alert(a == "1");//true;
alert(a === "1");//false;
reference: http://stackoverflow.com/questions/523643/difference-between-and-in-javascript
分享到:
相关推荐
In the event of page getting full and reaching the PageItemCount, MGIndex will sort the keys in the page's dictionary and split the data in two pages ( similar to a b+tree split) and update the page ...
WebSocket facilitates complete duplex communication between the client and server. HTML5 made it possible to create enterprise-level applications considering the important parameters related to ...
Fixed a lot of incompatabilities between VCLZip and WinZip Other assorted fixes ==================== Version 3.04 Build 1 New ZLib methods for optimized compression and decompression of single ...
the mod_rewrite module and the ability to use local .htaccess files. For Clean URLs support on IIS, see "Using Clean URLs with IIS" (http://drupal.org/node/3854) in the Drupal handbook. - Various ...
between configurable key characters.FEATURES: netWindows represents a new type of DHTML API that helps facilitate the creation and usage of "truly" dynamic interfaces. That is, DHTML ...
thedistancebetweentherequirementsandtheobtainedtrialsolution.Thedeviceunderdevelopment canbeanalyzedwithclassicalnumericalmethodologiessuchasFEM,FDTD...
The following are all the settings which are different in either the production ; or development versions of the INIs with respect to PHP's default behavior. ; Please see the actual settings later in...
behaviour between ANSI and UNICODE version - when writing HTML background color is not set to white when shading is 0. 0 is treated as default value. - image align center and right now works in HTML ...
In addition to the default Bochs method using the CTRL key and the middle mouse button there are now the choices: - CTRL+F10 (like DOSBox) - CTRL+ALT (like QEMU) - F12 (replaces win32 'legacyF12'...
MESSAGE Changes the density and the density units for a solid body. SYNONYMS edit mass, thickness, solid property HELP DSN_solid_density BITMAP editsoliddensity ACTIONS STANDARD SEPARATOR ...
5.9 The Scalar Expression Between Brackets . . . . . . . . . . . . . . . . 106 viii Contents 5.10 The Scalar Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 5.11 Casting of ...
boolean验证域的值可以看作是布尔值,可以是true,false,1,0,"1","0",'1' and '0'。date验证域必须为日期字符串形式,可以被Date.parse方法解析。date_format:format验证域必须符合制定的日期格式,允许的日期...