percent of increase




JavaScript Source Code 3000: Calculators: Percent of Increase








































Percent of Increase







Enter two numbers and JavaScript will help you determine the percent of increase. This is a perfectly simple example of using a JavaScript return function. Check it out!






Enter the two numbers to determine the percent of increase:
to

The percentage of increase is



document.increaseform.num1.value="20";
document.increaseform.num2.value="87";





JavaScript Source Code 3000: Calculators: Percent of Increase
Simply click inside the window below, use your cursor to highlight the script, and copy (type Control-c or Apple-c) the script into a new file in your text editor (such as Note Pad or Simple Text) and save (Control-s or Apple-s). The script is yours!!!





    





<!-- TWO STEPS TO INSTALL PERCENT OF INCREASE:

1. Copy the coding into the HEAD of your HTML document
2. Add the last code into the BODY of your HTML document -->

<!-- STEP ONE: Paste this code into the HEAD of your HTML document -->

<HEAD>

<SCRIPT LANGUAGE="JavaScript">
<!-- Original: Joey Mornin (jmornin@gateway.net) -->
<!-- Modified with permission by Ronnie T. Moore -->

<! >
<! >

<!-- Begin
function findIncrease(form) {
var num1 = form.num1.value;
var num2 = form.num2.value;
return ((num2 - num1) / num1 * 100 + "%");
}
// End -->
</script>
</HEAD>

<!-- STEP TWO: Copy this code into the BODY of your HTML document -->

<BODY>

<center>
<form name=increaseform>
Enter the two numbers to determine the percent of increase:<p>
<input type=text name=num1 size=4> to <input type=text name=num2 size=4>
<input type=button value="Solve" onClick="this.form.answer.value = findIncrease(this.form);"><p>
The percentage of increase is <input type=text name=answer size=6>
</form>
</center>



<!-- Script Size: 1.17 KB -->










Wyszukiwarka

Podobne podstrony:
William Gibson Fragments Of A Hologram Rose
effect of varying doses of caffeine on life span D melanogaster
Thrilling Tales Advanced Class Man of Mystery
Functional Origins of Religious Concepts Ontological and Strategic Selection in Evolved Minds
Beyerl P The Symbols And Magick of Tarot
Beats of freedom
Next of Kin
Passage of a Bubble Detonation Wave into a Chemically Inactive Bubble Medium
Middle of the book TestA Units 1 7
cof a crescendo of passion bleeding
World of Darknes Karta pl
E 22 Of Domine in auxilium
Assembly of outer membrane proteins in bacteria nad mitochondria
Abc All Of My Heart

więcej podobnych podstron