How to do calculations in HTML forms using JavaScript

0 votes

I'm developing a straightforward app that multiplies a user-inputted value by five and shows the outcome. I need some assistance with this because I'm just starting off.

Here is the HTML I use.

  <!DOCTYPE html>
    <head>
    <title>Area Calc</title>
       <link rel='stylesheet' type='text/css' href='style.css'/>
       <link href='http://fonts.googleapis.com/css?family=Titillium+Web' rel='stylesheet' type='text/css'>
       <link href='http://fonts.googleapis.com/css?family=Exo+2' rel='stylesheet' type='text/css'>
             <script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
            <script type='text/javascript' src='script.js'></script>

            <head>
            <body>
            <div class="heading">Number Of Persons Calc</div>
         <div style=" color: white; text-align:auto; width:400px; margin-right:auto; margin-left:auto; border:1px solid white; margin-top: 120px;">
        <form method="" action="">
                <input type="text" name="area" placeholder="Enter in square metres!" class="input" />
                <input class="submit" type="submit" value="Submit" class="button" />

            </form>
            </div>
<body>
<html>

Can someone please tell me what JavaScript/jQuery code might possible multiply the user-entertainment value from the text input element by 5 and then show the user the result? Please, if you can, assist me.

Jul 26, 2022 in HTML by Tejashwini
• 3,820 points
1,571 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In HTML

0 votes
0 answers

How to do calculation in PHP using a csv file for retrieving data?

Morning, I have a csv file and i ...READ MORE

Feb 11, 2020 in HTML by anonymous
• 140 points
1,451 views
0 votes
0 answers

How to insert spaces/tabs in text using HTML/CSS

how to add space in HTML except ...READ MORE

Jun 3, 2022 in HTML by Tejashwini
• 3,820 points
371 views
0 votes
2 answers

How to play video in react.js using html video tag?

This is a solution: import Video from "..Videos/video1.mp4" class ...READ MORE

answered May 21, 2023 in HTML by Renie
7,246 views
0 votes
0 answers

How do I link a JavaScript file to a HTML file?

How should a JavaScript file be linked ...READ MORE

Jul 21, 2022 in HTML by Ashwini
• 5,430 points
433 views
0 votes
0 answers

How to use <form:form> </form:form> TAG using HTML in Spring MVC?

How to utilize the <form:form> </form:form> In Spring MVC ...READ MORE

Jul 26, 2022 in HTML by Ashwini
• 5,430 points
389 views
0 votes
0 answers

How to add/update an attribute to an HTML element using JavaScript?

I'm looking for a JavaScript method to ...READ MORE

Aug 1, 2022 in HTML by Ashwini
• 5,430 points
565 views
0 votes
0 answers

Expand form based on radio selection in jQuery & Bootstrap

I am trying to show a part ...READ MORE

Jul 22, 2022 in Web Development by gaurav
• 23,260 points
588 views
0 votes
1 answer

What is jQuery?

Hey, jQuery is a fast and concise JavaScript ...READ MORE

answered Feb 14, 2020 in JQuery by kartik
• 37,520 points
1,317 views
0 votes
1 answer

Uncaught TypeError: Cannot read property 'msie' of undefined - jQuery tools

Hello, Use the following script tag in your ...READ MORE

answered Apr 28, 2020 in JQuery by Niroj
• 82,840 points
15,711 views
0 votes
1 answer

Uncaught Error: Bootstrap's JavaScript requires jQuery

Hello @kartik, You have provided wrong order for ...READ MORE

answered Apr 28, 2020 in JQuery by Niroj
• 82,840 points
23,295 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP