From 789e5b645f6a078d661dd54acde046900407cdd4 Mon Sep 17 00:00:00 2001 From: Xaloc Date: Thu, 18 Jun 2020 22:57:25 +0200 Subject: [PATCH] change html layout, better format number --- index.html | 3 ++- script.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index 90c06b6..cf52eee 100644 --- a/index.html +++ b/index.html @@ -25,11 +25,12 @@ + +

Converted:

- diff --git a/script.js b/script.js index 2348815..af29a92 100644 --- a/script.js +++ b/script.js @@ -13,5 +13,5 @@ async function convert(){ coef = 1; } var val = document.getElementById('val').value; - document.getElementById('res').textContent = val*coef + ' ' +document.getElementById('curr2').value; + document.getElementById('res').textContent = Number((val*coef).toFixed(2)).toLocaleString('en') + ' ' +document.getElementById('curr2').value; }