»
EnglishFrenchVietnamese

Print - Chemistry Calculator - JavaScriptBank.com

Full version: jsB@nk » » Chemistry Calculator
URL: https://www.javascriptbank.com/chemistry-calculator.html

Chemistry Calculator © JavaScriptBank.comUsing basic theory and this calculator, you can quickly find the answers to your chemistry stoichiometry equations.

Full version: jsB@nk » » Chemistry Calculator
URL: https://www.javascriptbank.com/chemistry-calculator.html



JavaScript
<script type="text/javascript">/*Created by: Kim Bratzel :: http://kim.ugtech.net/blog*/function NMR() {  if (document.form.N.value == "")    document.form.N.value = document.form.M.value/document.form.R.value  if (document.form.M.value == "")    document.form.M.value = document.form.N.value*document.form.R.value  if (document.form.R.value == "")    document.form.R.value = document.form.M.value/document.form.N.value}function CVA() {  if (document.form.C.value == "")    document.form.C.value = document.form.A.value/document.form.V.value  if (document.form.V.value == "")    document.form.V.value = document.form.C.value*document.form.A.value  if (document.form.A.value == "")    document.form.A.value = document.form.V.value*document.form.C.value}function clear1() {  document.form.N.value = ""  document.form.M.value = ""  document.form.R.value = ""}function clear2() {  document.form.C.value = ""  document.form.V.value = ""  document.form.A.value = ""}</script><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<strong>Empirical Formula</strong><form name="form" action='#top'>  <table>    <tr>      <td>Number of Moles of atoms (n) :</td>      <td><input type="text" name="N" size="20" /></td>    </tr>    <tr>      <td>Mass of Element (m) :</td>      <td><input type="text" name="M" size="20" /></td>    </tr>    <tr>      <td>Relative Atomic Mass (Ar) :</td>      <td><input type="text" name="R" value="" size="20" /></td>    </tr>    <tr>      <td></td>      <td><input type="button" value="Calculate" onclick="NMR()" />      <input type="button" value="Clear" onclick="clear1()" /></td>    </tr>  </table>  <strong>Molarity</strong>  <table>    <tr>      <td>Concentration of Solute (M) :</td>      <td><input type="text" name="C" size="20" /></td>    </tr>    <tr>      <td>Amount of Solute (n) :</td>      <td><input type="text" name="A" size="20" /></td>    </tr>    <tr>      <td>Volume of Solution (L) :</td>      <td><input type="text" name="V" value="" size="20" /></td>    </tr>    <tr>      <td></td>      <td><input type="button" value="Calculate" onclick="CVA()" />      <input type="button" value="Clear" onclick="clear2()" /></td>    </tr>  </table></form><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->