|
Home
|
|
Indice Javascript
|
Clock
Browser
Finestre
Status Bar
Background
Calcolatrici
Grafica ed Effetti
Convertitori
Utility
Form
Menu e Link
Euro - Lira & Lira - Euro
Usa Copia e incolla questa è la sorgente
<script language="JavaScript"> <!-- Autore: Massimo Giari (webmaster@massimo61.org) --> <!-- function addNum(input, num) { if(input.value == null || input.value == "0") input.value =num else input.value += num } function euro(form) { form.display.value = eval(form.display.value) / 1936.27; form.display.value = Math.round(form.display.value * 100) / 100; } function lira(form) { form.display.value = eval(form.display.value) * 1936.27; form.display.value = Math.round(form.display.value * 100) / 100; } // --> </script> </head> <body> <form> <table border="1" align="center" width="30%" cellpadding="2" cellspacing="4" bgcolor="#000000" bordercolor="#FFFFFF"> <tr align="center"> <td colspan ="3"> <table border="0"> <tr> <td align=center> <input name="display" value="0" size="35"> </td> </tr> </table> </tr> <tr> <td align="center" width="10%"> <input type="button" name="button" value=" 7 " onClick="addNum(this.form.display, '7')"> </td> <td align="center" width="10%"> <input type="button" name="button" value=" 8 " onClick="addNum(this.form.display, '8')"> </td> <td align="center" width="10%"> <input type="button" name="button" value=" 9 " onClick="addNum(this.form.display, '9')"> </td> </tr> <tr> <td align="center" width="10%"> <input type="button" name="button" value=" 4 " onClick="addNum(this.form.display, '4')"> </td> <td align="center" width="10%"> <input type="button" name="button" value=" 5 " onClick="addNum(this.form.display, '5')"> </td> <td align="center" width="10%"> <input type="button" name="button" value=" 6 " onClick="addNum(this.form.display, '6')"> </td> </tr> <tr> <td align="center" width="10%"> <input type="button" name="button" value=" 1 " onClick="addNum(this.form.display, '1')"> </td> <td align="center" width="10%"> <input type="button" name="button" value=" 2 " onClick="addNum(this.form.display, '2')"> </td> <td align="center" width="10%"> <input type="button" name="button" value=" 3 " onClick="addNum(this.form.display, '3')"> </td> </tr> <tr> <td align="center" width="10%"> <input type="button" name="button" value=" 0 " onClick="addNum(this.form.display, '0')"> </td> <td align="center" width="10%"> <input type="button" name="button" value=" . " onClick="addNum(this.form.display, '.')"> </td> <td align="center" width="10%"> </td> </tr> <tr> <td align="center" width="10%"> <input type="button" name="button" value=" Lira " onClick="if ((this.form.display.value)){ lira(this.form) }"> </td> <td align="center" width="10%"> <input type="button" name="button" value=" Euro " onClick="if ((this.form.display.value)){ euro(this.form) }"> </td> <td align="center" width="10%"> <input type="reset" name="button" value="Resetta"> </td> </tr> </table> <br> </form> <p><center> <font face="Verdana" size="-2">Free JavaScripts da<br> <a href="http://www.massimo61.org/">Free Web Upgrade</a></font> </center><p>