<html>
      <head>
        <title>Variable example</title>
        <script language="JavaScript">	
	          function ClickMe()
	          {
	              var alert_text = "Hi, this is the variable tutorial";
                alert(alert_text);
	          }				
        </script>
      </head>
      <body>
          <form>
            <input type="button" name="btnComments" value="Click Me" onclick="javascript:ClickMe();">
          </form>
      </body>
    </html>








		   
    function ClickMe()
    {
       var new = "Hi, this is the variable tutorial";
       alert(new);
    }			







		   
    function ClickMe()
    {
        var 00alert_text = "Hi, this is the variable tutorial";
        alert(00alert_text);
    }















		   
    var global_variable = "This is the global variable";
    function ClickMe()
    {
        var local_variable = "This is the local variable";
        alert(local_variable);
        ClickMeAgain();
    }
    function ClickMeAgain() 
    {
        alert(global_variable);
    }





Posted By  -  Karan Gupta
 
Posted On  -  Wednesday, December 01, 2010

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250