Course Solutions Uncategorized (Solved) : 5 Ciscch9pp346 Application Create Checkbox Element Html Page Associated Onclick Function C Q30557909 . . . .

(Solved) : 5 Ciscch9pp346 Application Create Checkbox Element Html Page Associated Onclick Function C Q30557909 . . . .

 

5)        CISC_CH9_pp346 application below

Create a checkbox element on the HTML page and an associatedonclick function with this control. Inside the click eventassociated with the checkbox, access the tip percent subtotal andthe tip percentage as was done on the computetip function. Addanother five percent To the tip if the checkbox is clicked, andsubtract five percent from the tip if the checkbox Is not checked.Instead of using windows onload you may use defer in the link tothe js file.

<html>

<head>

<script src =”please_346.js” type = “text/javascript”></script>

</head>

<h1>Tip Calculator</h1>

<div>

<input id=”subtotal” type=”text” size=”5″ /> subtotal<br />

<button id=”tenpercent”>20%</button>

<button id=”fifteenpercent”>15%</button>

<button id=”eighteenpercent”>18%</button>

<span id=”total”></span> </div>

</div>

</html>

PLEASE_346.js

window.onload = function(){

document.getElementById(“tenpercent”).onclick = computeTip;

document.getElementById(“fifteenpercent”).onclick =computeTip;

document.getElementById(“eighteenpercent”).onclick =computeTip;

};

// Computes

OR

PayPal Gateway not configured

OR

PayPal Gateway not configured

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post