Javascript Sample Code : Using document.write in the body

 <html>

<head> <title>First Javascript Program place on the body </title> </head> 

   <body>   

      <script language = "javascript" type = "text/javascript">

         <!-- use comment for browsers that does not support javascipt

           var name;

               document.write("<br> welcome to Javascript Programming " );

  name=prompt("Enter your name") 

      age=prompt("Enter your age");

               document.write("<br> Name :  <b>" +name );

               document.write("<br> Age :  <b>" + age );

      course=prompt("Enter your Course");

               document.write("<br> Course :  <b>" + course );

      

              

         //-->

      </script>      

   </body>


First Javascript Program place on the body

Comments

Popular posts from this blog

Javascript Code using getElementById and If Else Statement

Javascript Code Using If Else to Compute Discount based on Grades