Advertisement
svetoslavbozov

[JS] Operators and Expressions 3

Mar 13th, 2013
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <html>
  2. <head>
  3. <title></title>
  4. <link href="styles/js-console.css" rel="stylesheet" />
  5. </head>
  6. <body>
  7.     <div id="js-console">
  8.         <div>
  9.                 <label>Enter width : </label>
  10.                 <input type="text" id="width"/>                
  11.         </div>
  12.         <div>
  13.                 <label>Enter height: </label>
  14.                 <input type="text" id="height"/>                
  15.         </div>
  16.         <div>
  17.             <label>Calculate area : </label>
  18.             <input type="button" Value="Calc" onclick="CalculateArea()"/>
  19.         </div>
  20.     </div>
  21.     <script src="scripts/js-console.js">   
  22.     </script>  
  23.     <script>
  24.         function CalculateArea() {
  25.         var width = jsConsole.readFloat("#width");
  26.         var height = jsConsole.readFloat("#height");
  27.  
  28.         jsConsole.writeLine(width * height);
  29.         }  
  30. </script>  
  31. </body>
  32. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement