- 1
[Solved] How can I make calculater? can any one help me?
Just I don't know how i use javascript I think it's better that creating function an add to html as onclick and put digits as argument
13 Antworten
+ 2
Don't hurry, read the readings, make sure you understand it.
Here is step 2:
2.1 eval()
https://code.sololearn.com/WTEZml9BfCVd/?ref=app
Readings about 2.1:
https://www.sololearn.com/post/97586/?ref=app
+ 3
https://code.sololearn.com/WYp5kozajlRl/?ref=app
+ 3
You should be able to find plenty of solutions on the web too.
+ 2
This is step 1:
https://code.sololearn.com/Wy1Sj8694qWv/?ref=app
1.1 add html div, add title
1.2 style css, add a border
1.3 global variable
1.4 onload
1.5 DOM
1.6 display stored expression (test)
Readings
for 1.3 Scope
https://www.sololearn.com/post/91113/?ref=app
for 1.4 onload
https://www.sololearn.com/post/90825/?ref=app
https://www.sololearn.com/post/233784/?ref=app
https://code.sololearn.com/WKKkpq0efxai/?ref=app
+ 2
https://code.sololearn.com/WE9Q4CLXS61d/?ref=app
This may help you
+ 1
Or I can use jQuery
+ 1
Yes, that is a way.
Please show your code here so that we can help you
https://www.sololearn.com/post/75089/?ref=app
+ 1
Ijust design
+ 1
Good,
Let me teach you step by step
+ 1
Ok let me do it
+ 1
This is step 3
3.1 a function to update the display.
3.2 a function to append "1" to current expression.
3.3 onlick at HTML
https://code.sololearn.com/W9Vl5uz9hNXA/?ref=app
Readings about 3.3
https://code.sololearn.com/W0ehmlP2Y3I3/?ref=app
https://www.sololearn.com/post/43430/?ref=app
https://code.sololearn.com/Wyr76080kKxS/?ref=app
From here, you can try to implement your idea of putting the number as argument to a function.
I need to cook dinner now , will be back after a few hours to check your progress.
0
I have finished my calculator
https://code.sololearn.com/WYp5kozajlRl/?ref=app
0
https://code.sololearn.com/WaRwohMLPNG8/?ref=app