Compare commits

..

No commits in common. "2c6311ad88740cf2b9d81acaf74a78444079b95d" and "49f59d0f86b25f9af9eed5ec0ec6f8c714b2e962" have entirely different histories.

2 changed files with 4 additions and 15 deletions

View File

@ -3,7 +3,7 @@
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="author" content="Arnau Busom i Vidal"> <meta name="author" content="Arnau Busom i Vidal">
<title>Currency Converter</title> <title>Conversor</title>
</head> </head>
<body> <body>
@ -13,11 +13,6 @@
<option value='SEK'>SEK</option> <option value='SEK'>SEK</option>
<option value='JPY'>JPY</option> <option value='JPY'>JPY</option>
<option value='GBP'>GBP</option> <option value='GBP'>GBP</option>
<option value='INR'>INR</option>
<option value='ISK'>ISK</option>
<option value='DKK'>DKK</option>
<option value='RON'>RON</option>
<option value='NOK'>NOK</option>
</select> </select>
<input type='number' id='val' step='0.01'> <input type='number' id='val' step='0.01'>
@ -28,19 +23,13 @@
<option value='SEK'>SEK</option> <option value='SEK'>SEK</option>
<option value='JPY'>JPY</option> <option value='JPY'>JPY</option>
<option value='GBP'>GBP</option> <option value='GBP'>GBP</option>
<option value='INR'>INR</option>
<option value='ISK'>ISK</option>
<option value='DKK'>DKK</option>
<option value='RON'>RON</option>
<option value='NOK'>NOK</option>
</select> </select>
<button onClick='convert()'>Convert</button>
<p> <p>
Converted: <span id='res'></span> Quantitat convertida: <span id='res'></span>
</p> </p>
<button onClick='convert()'>convertir</button>
<script src='script.js'></script> <script src='script.js'></script>
</body> </body>

View File

@ -13,5 +13,5 @@ async function convert(){
coef = 1; coef = 1;
} }
var val = document.getElementById('val').value; var val = document.getElementById('val').value;
document.getElementById('res').textContent = Number((val*coef).toFixed(2)).toLocaleString('en') + ' ' +document.getElementById('curr2').value; document.getElementById('res').textContent = val*coef + ' ' +document.getElementById('curr2').value;
} }