码迷,mamicode.com
首页 > 编程语言 > 详细

javascript === 与 ==

时间:2015-10-23 10:16:12      阅读:163      评论:0      收藏:0      [点我收藏+]

标签:

<!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>

 

javascript === 与 ==

标签:

原文地址:http://www.cnblogs.com/wucg/p/4903440.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!