|
@@ -0,0 +1,25 @@
|
|
|
+let cash = document.getElementById('cash');
|
|
|
+let out = document.getElementById('out');
|
|
|
+let cash2 = document.getElementById('cash');
|
|
|
+
|
|
|
+function convert (cash) {
|
|
|
+ out.innerHTML = cash * 26.3;
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+// ________________________________
|
|
|
+
|
|
|
+// Вариант второй без привязки к index.html(через prompt и alert)
|
|
|
+
|
|
|
+
|
|
|
+// function convert () {
|
|
|
+// let amount = prompt("Введите сумму в долларах. ","");
|
|
|
+// let courseParameter = prompt("Введите курс доллара")
|
|
|
+// let summ = courseParameter * amount;
|
|
|
+// alert(summ.toFixed(2) + " Uah");
|
|
|
+
|
|
|
+// }
|
|
|
+
|
|
|
+// convert()
|