/ Published in: JavaScript
A simple code for changing currencies using Google:)
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<script type="text/javascript"> function callGoogle(){ var form=document.getElementById("Gform"); var link="http://www.google.hu/search?q="+form.elements["value"].value+"+"+form.elements["from"].value+"+to+"+form.elements["to"].value; location.href=link; } </script> <form id="Gform"> <input type="text" name="value" size="6"> <select name="from"> <option>EUR <option>HUF <option>GBP <option>AUD <option>CZK <option>DKK <option>JPY <option>CAD <option>PLN <option>NOK <option>CHF <option>SEK <option>SKK <option>USD </select> TO <select name="to"> <option>HUF <option>GBP <option>AUD <option>CZK <option>DKK <option>EUR <option>JPY <option>CAD <option>PLN <option>NOK <option>CHF <option>SEK <option>SKK <option>USD </select> <input type="button" onclick="callGoogle()" value="Change!"> </form>