Thursday, January 19, 2012

java source coding: javascriptDHTML(Identity and Equality)

try this example:
<html>
<head>
<title>Identity and Equality</title>
<script type="text/javascript">

var sValue = "3.0";
var nValue = 3.0;

if (nValue == "3.0"document.write("According to equality, value is 3.0");

if (nValue ==="3.0"document.write("According to identity, value is 3.0");  

if (sValue != 3.0document.write("According to equality, value is not 3.0");

if (sValue !== 3.0document.write("According to identity, value is not 3.0");

</script>
</head>
<body>
<p>Some page content</p>
</body>
</html>


submitted by guest blogger
cloe henry, France
Retweet this story

No comments:

Post a Comment