currency changer with google


/ Published in: JavaScript
Save to your folder(s)

A simple code for changing currencies using Google:)


Copy this code and paste it in your HTML
  1. <script type="text/javascript">
  2.  
  3. function callGoogle(){
  4.  
  5. var form=document.getElementById("Gform");
  6. var link="http://www.google.hu/search?q="+form.elements["value"].value+"+"+form.elements["from"].value+"+to+"+form.elements["to"].value;
  7. location.href=link;
  8.  
  9. }
  10.  
  11. </script>
  12.  
  13. <form id="Gform">
  14.  
  15. <input type="text" name="value" size="6">
  16.  
  17. <select name="from">
  18. <option>EUR
  19. <option>HUF
  20. <option>GBP
  21. <option>AUD
  22. <option>CZK
  23. <option>DKK
  24. <option>JPY
  25. <option>CAD
  26. <option>PLN
  27. <option>NOK
  28. <option>CHF
  29. <option>SEK
  30. <option>SKK
  31. <option>USD
  32. </select>
  33.  
  34. TO
  35.  
  36. <select name="to">
  37. <option>HUF
  38. <option>GBP
  39. <option>AUD
  40. <option>CZK
  41. <option>DKK
  42. <option>EUR
  43. <option>JPY
  44. <option>CAD
  45. <option>PLN
  46. <option>NOK
  47. <option>CHF
  48. <option>SEK
  49. <option>SKK
  50. <option>USD
  51. </select>
  52.  
  53. <input type="button" onclick="callGoogle()" value="Change!">
  54.  
  55. </form>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.