+ 1

I'm creating simple calculator but I have problem..

I've done html, css,& js work... but I can't evaluate the numbers . function e () { var evalo = eval (document.fre.text.value) document.fre.text.value = ; // help me }

14th Dec 2016, 2:23 PM
Asif khan
Asif khan - avatar
4 Answers
+ 3
document.fre.text.value = evalo;
15th Dec 2016, 1:23 PM
Sjoerd Flameling
Sjoerd Flameling - avatar
+ 3
it's better if you do: try { var a = eval(b); } catch (err) { alert(err); } so errors don't mess up the screen on mobile phones.
15th Dec 2016, 5:08 PM
Sjoerd Flameling
Sjoerd Flameling - avatar
+ 2
you haven't made it open for public yet. 😕
16th Dec 2016, 3:08 PM
Sjoerd Flameling
Sjoerd Flameling - avatar
0
Thank you. I've done it last night
15th Dec 2016, 4:47 PM
Asif khan
Asif khan - avatar