Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to make calculation in Javascript

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 120
    Comment on it

    Hello Reader's If you want to make the mathematic calculations inside the html document, Then by using the JS you can make calculations. You just have to use the document.write() function.

    Lets see it working in the example as below:-

    <html>
    <body>
    <p>Your calculations will apear here.</p>
    <button type="button" onclick="document.write(20 + 13)">Try it</button>
    
    </body>
    </html> 
    

    Now when the user will click the button the your calculation done in js will show up in para tag

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: