JavaScript Calculate 2 Numbers Form Input Text - Addition, Subtraction, Multiplication, Division

  Рет қаралды 321,205

1BestCsharp blog

1BestCsharp blog

Күн бұрын

How To Calculate Two Numbers In JavaScript : sum, minus, duplication, division
Source Code:
1bestcsharp.blo...
[[[[[[[[[[[[[[[[[[[[ Javascript And PHP Tutorials And Projects! ]]]]]]]]]]]]]]]]]]]]
▶ Javascript Tutorials For Beginners ➜ bit.ly/2k7NMWq
▶ Web Development Projects ➜ bit.ly/PHP_PRO...
▶ Javascript Course For Beginners ➜ bit.ly/2IvBCFC
▶ Javascript Projects Source Code ➜ bit.ly/3gS2IWv
▶ PHP Inventory Management System: • PHP Inventory Manageme...
▶ PHP Students Management System: • PHP Student Management...
▶ PHP Address Book Management System: • PHP Address Book Proje...
▶ PHP Programming Tutorials ➜ bit.ly/2Lh7zPM
▶ PHP And MySQL Tutorials ➜ bit.ly/2kdXWot
▶ PHP Programming Projects: bit.ly/PHP_PRO...
▶ PHP Course For Beginners ➜ bit.ly/2GxRodb
▶ Learn PHP By Building Projects ➜ bit.ly/2XAiDOn
▶ PHP Projects Source Code ➜ bit.ly/2WikoUq
▶ if you want to support our work, consider supporting the channel with a coffee!
➜ 1bestcsharp.se...
▶ Website Builder Tool ➜ bit.ly/2JgaZ64
------------------------------------------------------------------------------------------------
visit our blog 1bestcsharp.bl...
instagram: / 1bestcsharpblog
subscribe: goo.gl/nRjPKk
In This Javascript Tutorial we will See How To Calculate two Numbers ( Sum, Mutiplication, Division, Substraction )
Using Input Text, Button And Select Option For Math Operators In JS Using Netbeans Editor .
More Javascript Tutorials :
How to get value of selected radio button
• Javascript - How To Ge...
How to append Value to an array
• Javascript - How To Ap...
javascript images slider 1
• JS Images Slider - How...
Convert String To Number
• JavaScript - How To Co...
JavaScript Show And Hide Input Password Text
• JavaScript - How To Sh...
change div class name in js
• JavaScript - How To Ch...
using checkbox with js
• Javascript Checkbox - ...
get And Set Value To An Input
• Javascript - How To Ge...
Search Element In Array
• JavaScript - How To Se...
Add Search Remove Array Element
• JavaScript - How To Ad...
Add HTML Table Row
• Javascript - How To Ad...
Get Mouse Position
• Javascript - How To Ge...
Calculator:
• How To Make A Calculat...
share this video: • JavaScript Calculate 2...
#Javascript #Calculate #Addition #Subtraction #Multiplication #Division
----------- COURSES YOU MAY LIKE -----------
👉 Web Development Course: bit.ly/33eai4h
👉 Javascript Courses: bit.ly/35oYKwq
👉 Python Course: bit.ly/2XIdWlD
👉 React Course: bit.ly/2KQ7vrB
👉 PHP Course For Beginners: bit.ly/2GxRodb
👉 ASP.NET Course: bit.ly/2D8yR82
👉 Data Science Course: bit.ly/2Of3xL9
👉 Machine Learning Courses: bit.ly/2qHHBzh
👉 Full-stack .NET Developer Course: bit.ly/2OfooOB
👉 Docker Course: bit.ly/37wivnH

Пікірлер: 112
@bass_by296
@bass_by296 9 ай бұрын
Perfect❗
@RandomFacts-UTube
@RandomFacts-UTube 2 жыл бұрын
Btw, this tutorial helps me a lot. I was confused a lot but then u came with this video to pull me out from that confusion and difficulty, thanks a lot. ❤️
@rheyllcansico1677
@rheyllcansico1677 2 жыл бұрын
Thank you so much bro, I've been struggling for my assignment and i found your video thank you
@MankeyMite
@MankeyMite 4 жыл бұрын
was trying to figure out why my code wasn't working for hours,, and the problem was a capital C in the word "calc" :)) happy it works now tho!
@AutOdometer
@AutOdometer 7 жыл бұрын
thank you thank you thank you!!! using something simple like this for my website to basically add horsepower inputs to create a combined horsepower page for someone to calculate horsepower if there were to MOD their car... thank you again! it worked!!!
@extraexplorer
@extraexplorer 2 жыл бұрын
Simple code but teached a lot of concepts.. Thanks 👍❤️
@hothanmohaet672
@hothanmohaet672 Жыл бұрын
Thank you man u solve my assignment ♥️♥️😅
@bengalitablabeats6037
@bengalitablabeats6037 3 жыл бұрын
Thank you so much for making this video........... it really helped me a lot....
@ChandanKumar-lj8go
@ChandanKumar-lj8go 4 ай бұрын
Thanks you 👍
@Noor-gv8ec
@Noor-gv8ec 5 жыл бұрын
There's no need to write an if statement. You can also add them on this way. Here's the code. function myFunction() { var x = parseInt(document.getElementById("b1").value); var y = parseInt(document.getElementById("b2").value); var z = x + y; document.getElementById("demo").innerHTML = z; }
@1BestCsharpblog
@1BestCsharpblog 5 жыл бұрын
you need if statement to know what operation to do
@sujinlu738
@sujinlu738 3 жыл бұрын
thanks this finished the last part I was struggling on
@rohithawijethunga995
@rohithawijethunga995 3 жыл бұрын
Thank you !
@raul2484
@raul2484 4 жыл бұрын
THANK YOU SOOOOOOO MUCH MAN! THIS TUTORIAL IS THE POWERFUL ONE!!!! 😃😃😃😃😃😃😃😃😉😉😉😉😉😉😎😎😎😎😎😎
@carolinecarol5455
@carolinecarol5455 2 жыл бұрын
Thank you so mush!! very very good 🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙌🙌😀😀
@azma7md
@azma7md 6 жыл бұрын
thank u ,u helped me alot
@KrishnaWyvern
@KrishnaWyvern 6 жыл бұрын
Thanks bhai shukriya
@vipchhora7351
@vipchhora7351 3 жыл бұрын
Thanks
@rooticaa2842
@rooticaa2842 5 жыл бұрын
Great Tutorial!! You saved my a** Thanks!!
@saitarun6562
@saitarun6562 5 жыл бұрын
funny
@hazirahmuslim
@hazirahmuslim 3 жыл бұрын
Thanks! It worked! ^^
@tinalee8686
@tinalee8686 3 жыл бұрын
Thanks a lot❤
@clement4386
@clement4386 4 жыл бұрын
Thanks a lot for your tutorial
@lovestories701
@lovestories701 4 жыл бұрын
thanks sir
@realtalkjames2408
@realtalkjames2408 4 жыл бұрын
Thanks a bunch lad, helpful !
@MuhammadAslam-vb3se
@MuhammadAslam-vb3se 6 жыл бұрын
hamasaaa khush rhooo ustaaad....
@roshanzamry2589
@roshanzamry2589 2 жыл бұрын
thanks man
@rajpandey7491
@rajpandey7491 5 жыл бұрын
Thanks bro
@TheRealRaynex
@TheRealRaynex 3 жыл бұрын
thank you
@azizbraig1243
@azizbraig1243 6 жыл бұрын
Thanks I like it
@Hqmzlch
@Hqmzlch 2 жыл бұрын
Thanks mate! (y)
@abashraf6279
@abashraf6279 2 жыл бұрын
Thanks man
@ayman1624
@ayman1624 Жыл бұрын
just what I needed thanks g
@prasadmadushan
@prasadmadushan 5 жыл бұрын
thanks a lot :)
@yayantar
@yayantar 2 жыл бұрын
Thanks !
@AhsanRaza-mx2ty
@AhsanRaza-mx2ty 5 жыл бұрын
thank u
@vimadanutalai1008
@vimadanutalai1008 Жыл бұрын
Thank you for concept .I’ll try this in my project ❤
@chennaiahe8509
@chennaiahe8509 5 жыл бұрын
Very good bro... but its would be better if u added the voice.
@abiramis2298
@abiramis2298 5 жыл бұрын
Can we also make use of radio button instead of Dropbox ?will it work the same?
@LetsDoDifferent
@LetsDoDifferent 6 жыл бұрын
Nice sir How add 2*3*8*5*3*5= CREATE please
@codeAlongwith
@codeAlongwith 5 жыл бұрын
Wow great! Would putting html elements around these such as divs have any impact?
@1BestCsharpblog
@1BestCsharpblog 5 жыл бұрын
NO impact
@Atrophyiies
@Atrophyiies 6 жыл бұрын
what do I do if I want add subtract to be buttons not a drop down? please help
@1BestCsharpblog
@1BestCsharpblog 6 жыл бұрын
just add the code for subtract to the button onclick event
@uncuttricks4387
@uncuttricks4387 5 жыл бұрын
i add 2 more values in your code but it's showing "" nul "" . is it compulsory to add all values ? . how to fix it
@onlineworkwear941
@onlineworkwear941 5 жыл бұрын
How do you set n2 to be a fix numeric value? So for example if you wanted to calculate the price of something: n1(qty) x n2($2.50)
@1BestCsharpblog
@1BestCsharpblog 5 жыл бұрын
you can add "readonly" to your input like this -- or use a span instead
@HarishKumar-lw2ze
@HarishKumar-lw2ze 6 жыл бұрын
plz add this type video : I have a four textbox. first i give one number in first box textbox and other textbox we have value , then remaining three textbox automatically decrease the value and show that textbox 0
@kazuma4643
@kazuma4643 2 жыл бұрын
thanks sir! but i want to know how to do (a+bi)*(c+di)?
@erosveizi91
@erosveizi91 7 жыл бұрын
Cant Understand only one thing and it looks very strange. If i save the result in a variable inside the function: var result=document.getElementById('result').value; result=num1+num2; the result wont show in its textbox. But if i write: var result=document.getElementById('result'); result.value=num1+num2; then everything is alright. Can you please explain me this???
@1BestCsharpblog
@1BestCsharpblog 7 жыл бұрын
In " var result=document.getElementById('result').value; " the "result" have the value of the textbox [ Ex: 1,2,999, 2348.................. ] and in " var result=document.getElementById('result'); " the "result" have the reference of the textbox so you can set the value to the textbox using the "result" var (result.value=num1+num2;)
@CyberTronXXX
@CyberTronXXX 7 жыл бұрын
Do you have the result outside the function? Because then it would be unable to pick up the variable, because if you write it inside, then it will ofcourse only count for inside the function and not out of it. Unsure of what's your problem as I cannot see the code.
@KURT-nw7eb
@KURT-nw7eb 4 жыл бұрын
Is there a way to do it without the button and only the select??
@msann2060
@msann2060 5 жыл бұрын
Atlast i found thia now i can make my own calculator
@rahatmalik-dl9ue
@rahatmalik-dl9ue 3 жыл бұрын
Bro my code does not form a equal to sign
@1BestCsharpblog
@1BestCsharpblog 3 жыл бұрын
well it should be, are you puting the '=' in the right place?
@raheels.1068
@raheels.1068 6 жыл бұрын
hi i look lot of videos but i cant find any thing which show how i can use code to add. id, code, then amount,date, update,delete. next page, if i want to know with code(serial number) how much amount have. or how many time i use this serial number serial number of a card. as bank card. but there is lot of cards. so if i want to know how many time i use it to add money or take out money.. can you make a example of this ? THANKS
@tanaysambrani176
@tanaysambrani176 4 жыл бұрын
Thank you so much. Great tutorial 😍
@sergeseveau6258
@sergeseveau6258 Жыл бұрын
could you please show me how to limit the answer to 2 decimal places - thank you in advance. 👍
@1BestCsharpblog
@1BestCsharpblog Жыл бұрын
document.getElementById('result').value = calculationResult.toFixed(2);
@sergeseveau6258
@sergeseveau6258 Жыл бұрын
@@1BestCsharpblog WOW thank you so much - - but where do I put this statement (sorry for being so dumb)
@Depressso
@Depressso 2 жыл бұрын
Is there a way to make this in c#/wpf
@nitinmaurya2269
@nitinmaurya2269 4 жыл бұрын
Aap kis text editor ka use krte ho?
@kevinsigue1207
@kevinsigue1207 6 жыл бұрын
does this works if multiple dots(.) will be inputted? and how to make the dot appear only once?
@1BestCsharpblog
@1BestCsharpblog 6 жыл бұрын
you need to check the text field already contains a dot watch this calculator tutorial to learn more kzbin.info/www/bejne/aYLXXqqfgs-JbZo
@kevinsigue1207
@kevinsigue1207 6 жыл бұрын
thanks :D
@ManishaGupta-yu1sr
@ManishaGupta-yu1sr 6 жыл бұрын
Nyc
@YoungFuji-ct8hf
@YoungFuji-ct8hf 5 жыл бұрын
Would a switch statement work with all this?
@spiderweb3324
@spiderweb3324 Жыл бұрын
off course it will work. He was made this with if else and on click function, you can do it with addEventListener grab value of operators and then with switch manipulate with numbers.
@TobilobaItiola-l3t
@TobilobaItiola-l3t 6 ай бұрын
Good. But why is there no sound???
@RandomFacts-UTube
@RandomFacts-UTube 2 жыл бұрын
Haven't u put any voice over in this video? Or my device gonna stop working properly...?
@tanny_edits
@tanny_edits 4 жыл бұрын
can you please add buttons, instead of typing numbers , use buttons i hope you can do it
@madhavanmadhavan7786
@madhavanmadhavan7786 5 жыл бұрын
whats happen when i give else part after the if part?
@justinpettit3432
@justinpettit3432 6 жыл бұрын
Is it JavaScript they use for the fantasy football websites to add your points up and everything? If so do u know a vid that shows how u do that? If not do u know what they use to do that.
@1BestCsharpblog
@1BestCsharpblog 6 жыл бұрын
no i don't know :(
@metkic94
@metkic94 4 жыл бұрын
Wont add decimal numbers that are bellow 1 , 0.5+0.5...
@dhananabimanto429
@dhananabimanto429 4 жыл бұрын
how to write square operation code?
@youssefammi1436
@youssefammi1436 2 жыл бұрын
Switch is better than this or not
@nannthithihein4591
@nannthithihein4591 11 ай бұрын
how to change result infinity to zero when 2/0
@ezequiel_____
@ezequiel_____ 7 жыл бұрын
What software you use ?
@1BestCsharpblog
@1BestCsharpblog 7 жыл бұрын
netbeans
@jyotsnawankhede8440
@jyotsnawankhede8440 5 жыл бұрын
please tell why it is not comming or tell othet methof
@jjkklls
@jjkklls 2 жыл бұрын
mine was works but the results just show for a sec. it doesnt show permanently, help me pls. Sorry for my bad english
@sethlegaspi4336
@sethlegaspi4336 5 жыл бұрын
Whats is the problem i input 5 and 3 and to multiply it became 15555???? What happened????
@subhihokan556
@subhihokan556 7 жыл бұрын
Hi I have a question. How i can do if I want the answer become blue and if negative answer become red ?
@hanan-aslam
@hanan-aslam 6 жыл бұрын
:-D
@spiderweb3324
@spiderweb3324 Жыл бұрын
creating another class and add it to element, and when condition becomes true adding that class with style to that element.
@jyotsnawankhede8440
@jyotsnawankhede8440 5 жыл бұрын
i wrote all the functions properly but it is not coming in internet explorer properly
@jbruce87
@jbruce87 2 жыл бұрын
Lol, all these unanswered questions
@b5etcraft
@b5etcraft 4 жыл бұрын
how can i take any number of inputs ? how can i create array in HTTML ?
@VikramVikram-zr7xk
@VikramVikram-zr7xk 6 жыл бұрын
Sir output is not shown. What can I do
@1BestCsharpblog
@1BestCsharpblog 6 жыл бұрын
1 - find the problem 2 - fix the problem 3 - source code link in the description
@anjuvishwas309
@anjuvishwas309 3 жыл бұрын
@@1BestCsharpblog I tried and everything is correct but still I can't see the result
@EldenSoulsVids
@EldenSoulsVids 4 жыл бұрын
mine wasnt working right because i put the script section in the body instead of the head in case anyone else did that lol
@ДмитрийКварцев-ы1е
@ДмитрийКварцев-ы1е 4 жыл бұрын
0:43
@shiaclark3067
@shiaclark3067 5 жыл бұрын
does not work for me at all
@rayhanulislam4104
@rayhanulislam4104 5 жыл бұрын
It doesn't work
@uncuttricks4387
@uncuttricks4387 5 жыл бұрын
bhai iska kasa banega ? Example a+b+c+d = e e+ f= g
@tibormolnar2213
@tibormolnar2213 4 жыл бұрын
Thank you!
@digitaldata-surveying
@digitaldata-surveying 4 жыл бұрын
thanks
@3ia14_dhamariogymnastiarno9
@3ia14_dhamariogymnastiarno9 5 жыл бұрын
thanks it good job (y)
@boredcat8421
@boredcat8421 2 жыл бұрын
thank you
@prottaybadhon8112
@prottaybadhon8112 5 жыл бұрын
thanks a lot
小丑在游泳池做什么#short #angel #clown
00:13
Super Beauty team
Рет қаралды 40 МЛН
МАИНКРАФТ В РЕАЛЬНОЙ ЖИЗНИ!🌍 @Mikecrab
00:31
⚡️КАН АНДРЕЙ⚡️
Рет қаралды 38 МЛН
GIANT Gummy Worm Pt.6 #shorts
00:46
Mr DegrEE
Рет қаралды 14 МЛН
Cute
00:16
Oyuncak Avı
Рет қаралды 11 МЛН
How to teach and train your brain to Get What You Really Want ? - John Assaraf
1:10:57
JavaScript Client-side Form Validation
29:07
Florin Pop
Рет қаралды 714 М.
Build A Calculator With JavaScript Tutorial
38:50
Web Dev Simplified
Рет қаралды 1,5 МЛН
User Input and Response on a webpage using JavaScript (for beginners)
16:55
JavaScript Monthly Payment Loan Calculator Programming Tutorial
6:32
小丑在游泳池做什么#short #angel #clown
00:13
Super Beauty team
Рет қаралды 40 МЛН