Home / Expert Answers / Computer Science / given-codes-in-the-subfolder-do-not-modify-these-just-post-the-javascript-code-for-this-solution-t-pa748

(Solved): Given codes in the subfolder: Do not modify these (just post the javascript code for this solution t ...



Coding questions. The following question needs your complete HTML code.
Please follow instructions to solve the problems
PleaO \( (15 \%) \) the program validates each of the input text boxes, including Subtotal and Tax Rate, and gives an alert dialoGiven codes in the subfolder: Do not modify these (just post the javascript code for this solution thank you)

index.html:

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Sales Tax Calculator</title>
    <link rel="stylesheet" href="sales_tax.css" />
</head>
<body>
    <main>
        <h1>Sales Tax Calculator</h1>
        <p>Enter Subtotal and Tax Rate and click "Calculate".</p> 
        <div>
            <label for="subtotal">Subtotal:</label>
            <input type="text" id="subtotal" >
        </div>
        <div>
            <label for="tax_rate">Tax Rate:</label>
            <input type="text" id="tax_rate" >
        </div>
        <div>
            <label for="sales_tax">Sales Tax:</label>
            <input type="text" id="sales_tax" disabled >
        </div>
        <div>
            <label for="total">Total:</label>
            <input type="text" id="total" disabled >
        </div>
        <div>
            <label></label>
            <input type="button" id="calculate" value="Calculate" >
            <input type="button" id="clear" value="Clear" >
        </div>
    </main>
    <script src="sales_tax.js"></script>
</body>
</html>

Sales_tax.css:

body {
    font-family: Arial, Helvetica, sans-serif;
    background-color: white;
    margin: 0 auto;
    width: 500px;
    border: 3px solid blue;
    padding: 0 2em 1em;
}
h1 {
    color: blue;
}
div {
    margin-bottom: 1em;
}
label {
    display: inline-block;
    width: 11em;
    text-align: right;
}
input {
    margin-left: 1em;
    margin-right: 0.5em;
}
span {
    color: red;
}
 

Coding questions. The following question needs your complete HTML code. Please follow instructions to solve the problems Please start with the original code given in each subfolder Modify files in the subfolder without modifying the file names. Problem 1 (50\%): Using JavaScript, create a simple web page that displays a Sales Tax Calculator, which accepts the user input on the sales subtotal and tax rate, and output the amount of sales tax and total amount of money that the user needs to pay. Program Requirements: Your program must be written in JavaScript. In addition, you should follow the specific guidelines below. - The web page displays Sales Tax Calculator as below. It should include: - two input text boxes for the sales subtotal and tax rate, and two disabled output text boxes for the sales tax and the sales total one Calculate button and one Clear button. Sales Tax Calculator Enter Subtotal and Tax Rate and click "Calculate". Subtotal: Tax Rate: Sales Tax: Total: - When the user clicks on the button Calculate \( (5 \%) \), O \( (15 \%) \) the program validates each of the input text boxes, including Subtotal and Tax Rate, and gives an alert dialog about the reason why the input is incorrect if any of the input is incorrect. Each of the input is required and should be numeric and greater than 0. \( (15 \%) \) If both input are valid, the text box for Sales Tax and Total will display the amount of sales tax and sales total respectively. - (15\%) When the user clicks on the button Clear \( (5 \%) \), all the textbox are set to empty (10\%). - Others: Please start with the original code given in the subfoler sales_tax Modify files in this subfolder without modifying the file names.


We have an Answer from Expert

View Expert Answer

Expert Answer


The asked Jav
We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe