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

  Рет қаралды 323,767

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
▶ PHP Projects Source Code Bundle: 1bestcsharp.bl...
▶ 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

Пікірлер: 114
@rheyllcansico1677
@rheyllcansico1677 2 жыл бұрын
Thank you so much bro, I've been struggling for my assignment and i found your video thank you
@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. ❤️
@hothanmohaet672
@hothanmohaet672 2 жыл бұрын
Thank you man u solve my assignment ♥️♥️😅
@bass_by296
@bass_by296 Жыл бұрын
Perfect❗
@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!
@carolinecarol5455
@carolinecarol5455 3 жыл бұрын
Thank you so mush!! very very good 🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙌🙌😀😀
@extraexplorer
@extraexplorer 3 жыл бұрын
Simple code but teached a lot of concepts.. Thanks 👍❤️
@bengalitablabeats6037
@bengalitablabeats6037 3 жыл бұрын
Thank you so much for making this video........... it really helped me a lot....
@Noor-gv8ec
@Noor-gv8ec 6 жыл бұрын
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 6 жыл бұрын
you need if statement to know what operation to do
@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!!!
@mannnnuuu
@mannnnuuu 3 күн бұрын
Its been 7 years! Hows your website?
@raul2484
@raul2484 4 жыл бұрын
THANK YOU SOOOOOOO MUCH MAN! THIS TUTORIAL IS THE POWERFUL ONE!!!! 😃😃😃😃😃😃😃😃😉😉😉😉😉😉😎😎😎😎😎😎
@sujinlu738
@sujinlu738 4 жыл бұрын
thanks this finished the last part I was struggling on
@ayman1624
@ayman1624 2 жыл бұрын
just what I needed thanks g
@hazirahmuslim
@hazirahmuslim 3 жыл бұрын
Thanks! It worked! ^^
@tinalee8686
@tinalee8686 4 жыл бұрын
Thanks a lot❤
@realtalkjames2408
@realtalkjames2408 4 жыл бұрын
Thanks a bunch lad, helpful !
@vimadanutalai1008
@vimadanutalai1008 2 жыл бұрын
Thank you for concept .I’ll try this in my project ❤
@clement4386
@clement4386 4 жыл бұрын
Thanks a lot for your tutorial
@roshanzamry2589
@roshanzamry2589 2 жыл бұрын
thanks man
@Hqmzlch
@Hqmzlch 2 жыл бұрын
Thanks mate! (y)
@abashraf6279
@abashraf6279 2 жыл бұрын
Thanks man
@chennaiahe8509
@chennaiahe8509 6 жыл бұрын
Very good bro... but its would be better if u added the voice.
@rooticaa2842
@rooticaa2842 6 жыл бұрын
Great Tutorial!! You saved my a** Thanks!!
@saitarun6562
@saitarun6562 6 жыл бұрын
funny
@MuhammadAslam-vb3se
@MuhammadAslam-vb3se 7 жыл бұрын
hamasaaa khush rhooo ustaaad....
@msann2060
@msann2060 5 жыл бұрын
Atlast i found thia now i can make my own calculator
@yayantar
@yayantar 3 жыл бұрын
Thanks !
@azma7md
@azma7md 7 жыл бұрын
thank u ,u helped me alot
@tanaysambrani176
@tanaysambrani176 4 жыл бұрын
Thank you so much. Great tutorial 😍
@lovestories701
@lovestories701 4 жыл бұрын
thanks sir
@AhmedTheCoder
@AhmedTheCoder 4 жыл бұрын
thanks
@KrishnaWyvern
@KrishnaWyvern 6 жыл бұрын
Thanks bhai shukriya
@tibormolnar2213
@tibormolnar2213 5 жыл бұрын
Thank you!
@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
@LetsDoDifferent
@LetsDoDifferent 7 жыл бұрын
Nice sir How add 2*3*8*5*3*5= CREATE please
@abiramis2298
@abiramis2298 6 жыл бұрын
Can we also make use of radio button instead of Dropbox ?will it work the same?
@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
@codeAlongwith
@codeAlongwith 6 жыл бұрын
Wow great! Would putting html elements around these such as divs have any impact?
@1BestCsharpblog
@1BestCsharpblog 6 жыл бұрын
NO impact
@kazuma4643
@kazuma4643 3 жыл бұрын
thanks sir! but i want to know how to do (a+bi)*(c+di)?
@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)
@nitinmaurya2269
@nitinmaurya2269 5 жыл бұрын
Aap kis text editor ka use krte ho?
@rajpandey7491
@rajpandey7491 5 жыл бұрын
Thanks bro
@azizbraig1243
@azizbraig1243 6 жыл бұрын
Thanks I like it
@prottaybadhon8112
@prottaybadhon8112 6 жыл бұрын
thanks a lot
@prasadmadushan
@prasadmadushan 5 жыл бұрын
thanks a lot :)
@tanny_edits
@tanny_edits 5 жыл бұрын
can you please add buttons, instead of typing numbers , use buttons i hope you can do it
@KURT-nw7eb
@KURT-nw7eb 5 жыл бұрын
Is there a way to do it without the button and only the select??
@onlineworkwear941
@onlineworkwear941 6 жыл бұрын
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 6 жыл бұрын
you can add "readonly" to your input like this -- or use a span instead
@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
@RandomFacts-UTube
@RandomFacts-UTube 2 жыл бұрын
Haven't u put any voice over in this video? Or my device gonna stop working properly...?
@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.
@AhsanRaza-mx2ty
@AhsanRaza-mx2ty 6 жыл бұрын
thank u
@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
@Depressso
@Depressso 3 жыл бұрын
Is there a way to make this in c#/wpf
@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
@jyotsnawankhede8440
@jyotsnawankhede8440 6 жыл бұрын
i wrote all the functions properly but it is not coming in internet explorer properly
@justinpettit3432
@justinpettit3432 7 жыл бұрын
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 7 жыл бұрын
no i don't know :(
@TobilobaItiola-l3t
@TobilobaItiola-l3t 11 ай бұрын
Good. But why is there no sound???
@mannnnuuu
@mannnnuuu 3 күн бұрын
He is serious guy
@jjkklls
@jjkklls 3 жыл бұрын
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 6 жыл бұрын
Whats is the problem i input 5 and 3 and to multiply it became 15555???? What happened????
@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
@Rahatmalik3414
@Rahatmalik3414 4 жыл бұрын
Bro my code does not form a equal to sign
@1BestCsharpblog
@1BestCsharpblog 4 жыл бұрын
well it should be, are you puting the '=' in the right place?
@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.
@metkic94
@metkic94 5 жыл бұрын
Wont add decimal numbers that are bellow 1 , 0.5+0.5...
@nannthithihein4591
@nannthithihein4591 Жыл бұрын
how to change result infinity to zero when 2/0
@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.
@madhavanmadhavan7786
@madhavanmadhavan7786 6 жыл бұрын
whats happen when i give else part after the if part?
@dhananabimanto429
@dhananabimanto429 4 жыл бұрын
how to write square operation code?
@jbruce87
@jbruce87 3 жыл бұрын
Lol, all these unanswered questions
@jyotsnawankhede8440
@jyotsnawankhede8440 6 жыл бұрын
please tell why it is not comming or tell othet methof
@ezequiel_____
@ezequiel_____ 7 жыл бұрын
What software you use ?
@1BestCsharpblog
@1BestCsharpblog 7 жыл бұрын
netbeans
@youssefammi1436
@youssefammi1436 3 жыл бұрын
Switch is better than this or not
@b5etcraft
@b5etcraft 4 жыл бұрын
how can i take any number of inputs ? how can i create array in HTTML ?
@ManishaGupta-yu1sr
@ManishaGupta-yu1sr 7 жыл бұрын
Nyc
@ДмитрийКварцев-ы1е
@ДмитрийКварцев-ы1е 4 жыл бұрын
0:43
@VikramVikram-zr7xk
@VikramVikram-zr7xk 7 жыл бұрын
Sir output is not shown. What can I do
@1BestCsharpblog
@1BestCsharpblog 7 жыл бұрын
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
@shiaclark3067
@shiaclark3067 5 жыл бұрын
does not work for me at all
@uncuttricks4387
@uncuttricks4387 5 жыл бұрын
bhai iska kasa banega ? Example a+b+c+d = e e+ f= g
@rayhanulislam4104
@rayhanulislam4104 6 жыл бұрын
It doesn't work
@ChandanKumar-lj8go
@ChandanKumar-lj8go 9 ай бұрын
Thanks you 👍
@rohithawijethunga995
@rohithawijethunga995 3 жыл бұрын
Thank you !
@vipchhora7351
@vipchhora7351 3 жыл бұрын
Thanks
@TheRealRaynex
@TheRealRaynex 3 жыл бұрын
thank you
@3ia14_dhamariogymnastiarno9
@3ia14_dhamariogymnastiarno9 5 жыл бұрын
thanks it good job (y)
@boredcat8421
@boredcat8421 3 жыл бұрын
thank you
The evil clown plays a prank on the angel
00:39
超人夫妇
Рет қаралды 53 МЛН
Правильный подход к детям
00:18
Beatrise
Рет қаралды 11 МЛН
Beat Ronaldo, Win $1,000,000
22:45
MrBeast
Рет қаралды 158 МЛН
User Input and Response on a webpage using JavaScript (for beginners)
16:55
Object-oriented Programming in JavaScript: Made Super Simple | Mosh
1:02:49
Programming with Mosh
Рет қаралды 2 МЛН
Use JavaScript to Get Value from a Textbox and Display on the Page
7:00
Six Minutes. Smarter.
Рет қаралды 217 М.
JavaScript Fundamentals For Beginners
1:08:22
Traversy Media
Рет қаралды 1,6 МЛН
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
Рет қаралды 720 М.
Build this JS calculator in 15 minutes! 🖩
15:20
Bro Code
Рет қаралды 783 М.
The evil clown plays a prank on the angel
00:39
超人夫妇
Рет қаралды 53 МЛН