Thursday, January 19, 2012

java source coding:javascriptDHTML(Comparing two strings)

try this example:
<html>
  <head>
    <title>Comparing two strings</title>
    <script type="text/javascript">
        var a = "C";
        var b = "J";
        
        if (a == b)
        {
            var identity = "same";
        }
        else
        {
            var identity = "different";
        }
        
        document.write(a + " and " + b + ": " + identity);    
    </script>
  </head>
  <body>
  </body>
</html>


submitted by guest blogger
stovic r., Norway
Retweet this story

No comments:

Post a Comment