Thursday, January 19, 2012

java source coding: javascriptDHTML(Compare string against integer with a strict test)

try this example:
<html>
<head>
    <title>Equality</title>
    <script type = "text/javascript">
    var x = 42;
    var y = "42";
    if (x ===y) {
        document.write("x is equal to y with a strict test.");
    else {
        document.write("x is not equal to y");
    }
    </script>
</head>
<body>
</body>
</html>


submitted by guest blogger
morgan stanz, Switzerland
Retweet this story

No comments:

Post a Comment