main.js 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. function moneyConverterUSD(){
  2. usd=26.35;
  3. number=document.getElementById("input_dol");
  4. result=(number.value*usd).toFixed(2);
  5. document.getElementById("output_grn1").innerHTML=result
  6. }
  7. function moneyConverterEUR(){
  8. eur=30.52;
  9. number=document.getElementById("input_evro");
  10. result=(number.value*eur).toFixed(2);
  11. document.getElementById("output_grn2").innerHTML=result;
  12. }
  13. function moneyConverterPLN(){
  14. pln=6.64;
  15. number=document.getElementById("input_zloty");
  16. result=(number.value*6.64).toFixed(2);
  17. document.getElementById("output_grn3").innerHTML=result;
  18. }
  19. function moneyConverterBitcoin(){
  20. bitcoin=1645030.38;
  21. number=document.getElementById("input_bitcoin");
  22. result=(number.value*bitcoin).toFixed(2);
  23. document.getElementById("output_grn4").innerHTML=result;
  24. }
  25. var credentials = {
  26. login: 'admin',
  27. password: 'qwerty',
  28. };
  29. let div= document.createElement('div');
  30. function check() {
  31. const login= document.getElementById("login").value;
  32. const password= document.getElementById("password").value;
  33. if (login==credentials.login&&password==credentials.password)
  34. {
  35. div.innerHTML = "You entered correct login and password!";
  36. document.querySelector('#correct').append(div);
  37. }
  38. else if( login==credentials.login){
  39. div.innerHTML = "You entered correct login, but wrong password!";
  40. document.querySelector('#wrong').append(div);
  41. }
  42. else if( password==credentials.password){
  43. div.innerHTML = "You entered correct password, but wrong login!";
  44. document.querySelector('#wrong').append(div);
  45. }
  46. else{
  47. div.innerHTML = "You entered wrong login and password!";
  48. document.querySelector('#wrong').append(div);
  49. }
  50. }