Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <title></title>
- <link href="styles/js-console.css" rel="stylesheet" />
- </head>
- <body>
- <div id="js-console">
- <div>
- <label>Enter width : </label>
- <input type="text" id="width"/>
- </div>
- <div>
- <label>Enter height: </label>
- <input type="text" id="height"/>
- </div>
- <div>
- <label>Calculate area : </label>
- <input type="button" Value="Calc" onclick="CalculateArea()"/>
- </div>
- </div>
- <script src="scripts/js-console.js">
- </script>
- <script>
- function CalculateArea() {
- var width = jsConsole.readFloat("#width");
- var height = jsConsole.readFloat("#height");
- jsConsole.writeLine(width * height);
- }
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement