首页 > 编程语言 > 详细

javascript === 与 ==

时间:2015-10-23 10:15:35      阅读:132      评论: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
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!