SlideShare a Scribd company logo
Add two numbers
<html>
  <head>
         <title>Input tutorial</title>
         <script language="javascript">
                 function addNumbers()
                 {
                         var val1 =
parseInt(document.getElementById("value1").value);
                         var val2 =
parseInt(document.getElementById("value2").value);
                         var ansD = document.getElementById("answer");
                         ansD.value = val1 + val2;
                 }
         </script>
  </head>
  <body>
         value1 = <input type="text" id="value1" name="value1" value="1"/>
         value2 = <input type="text" id="value2" name="value2" value="2"/>
         <input type="button" name="Sumbit" value="Click here"
onclick="javascript:addNumbers()"/>
         Answer = <input type="text" id="answer" name="answer" value=""/>
  </body>
</html>

More Related Content

What's hot

Enterprise workflow with Apps Script
Enterprise workflow with Apps ScriptEnterprise workflow with Apps Script
Enterprise workflow with Apps Script
ccherubino
 

What's hot (16)

Javascript - Beyond-jQuery
Javascript - Beyond-jQueryJavascript - Beyond-jQuery
Javascript - Beyond-jQuery
 
React и redux
React и reduxReact и redux
React и redux
 
jQuery Beginner
jQuery BeginnerjQuery Beginner
jQuery Beginner
 
mediator
mediatormediator
mediator
 
J Query Public
J Query PublicJ Query Public
J Query Public
 
Introduction to jQuery - The basics
Introduction to jQuery - The basicsIntroduction to jQuery - The basics
Introduction to jQuery - The basics
 
Web technology javascript
Web technology   javascriptWeb technology   javascript
Web technology javascript
 
Enterprise workflow with Apps Script
Enterprise workflow with Apps ScriptEnterprise workflow with Apps Script
Enterprise workflow with Apps Script
 
Grails UI Primer
Grails UI PrimerGrails UI Primer
Grails UI Primer
 
mediator
mediatormediator
mediator
 
Building complex User Interfaces with Sitecore and React
Building complex User Interfaces with Sitecore and ReactBuilding complex User Interfaces with Sitecore and React
Building complex User Interfaces with Sitecore and React
 
Marcus Portfolio
Marcus  PortfolioMarcus  Portfolio
Marcus Portfolio
 
ThingMaker in Swift
ThingMaker in SwiftThingMaker in Swift
ThingMaker in Swift
 
Scala on Your Phone
Scala on Your PhoneScala on Your Phone
Scala on Your Phone
 
Ajax for dummies, and not only.
Ajax for dummies, and not only.Ajax for dummies, and not only.
Ajax for dummies, and not only.
 
Stay with React.js in 2020
Stay with React.js in 2020Stay with React.js in 2020
Stay with React.js in 2020
 

Viewers also liked (20)

Act 2
Act 2Act 2
Act 2
 
Pdip
PdipPdip
Pdip
 
Denver, CO, screening flyer
Denver, CO, screening flyerDenver, CO, screening flyer
Denver, CO, screening flyer
 
014625
014625014625
014625
 
Fest folk 2012 zaproszenie
Fest folk 2012 zaproszenieFest folk 2012 zaproszenie
Fest folk 2012 zaproszenie
 
Birds
BirdsBirds
Birds
 
O ataque ..
O ataque ..O ataque ..
O ataque ..
 
XXL №2
XXL №2XXL №2
XXL №2
 
Efruzhu cancer carcinogenesis theory videos slight s1
Efruzhu cancer carcinogenesis theory videos slight s1Efruzhu cancer carcinogenesis theory videos slight s1
Efruzhu cancer carcinogenesis theory videos slight s1
 
Doc1
Doc1Doc1
Doc1
 
Theswillerz Bizfront New
Theswillerz Bizfront NewTheswillerz Bizfront New
Theswillerz Bizfront New
 
Model de comentari de text
Model de comentari de textModel de comentari de text
Model de comentari de text
 
Y
YY
Y
 
2013 Client of the Year Award: Lamar!
2013 Client of the Year Award: Lamar!2013 Client of the Year Award: Lamar!
2013 Client of the Year Award: Lamar!
 
Perrenoud diez nuevas competencias
Perrenoud diez nuevas competenciasPerrenoud diez nuevas competencias
Perrenoud diez nuevas competencias
 
Mapa discurso e o discurso dos mapas: algumas questões.
Mapa discurso e o discurso dos mapas: algumas questões.Mapa discurso e o discurso dos mapas: algumas questões.
Mapa discurso e o discurso dos mapas: algumas questões.
 
ใบงาน
ใบงานใบงาน
ใบงาน
 
Atividades quimica
Atividades quimicaAtividades quimica
Atividades quimica
 
نوف
نوفنوف
نوف
 
Storyboard 1
Storyboard 1Storyboard 1
Storyboard 1
 

Similar to Add two numbers karan chanana

Java.script
Java.scriptJava.script
Java.script
g Nama
 
Scala in practice
Scala in practiceScala in practice
Scala in practice
patforna
 
Do the following program in C++- Create a item class... with and i.pdf
Do the following program in C++- Create a item class... with and i.pdfDo the following program in C++- Create a item class... with and i.pdf
Do the following program in C++- Create a item class... with and i.pdf
ahntagencies
 
Javascript variables and datatypes
Javascript variables and datatypesJavascript variables and datatypes
Javascript variables and datatypes
Varun C M
 
Architecting JavaScript Code
Architecting JavaScript CodeArchitecting JavaScript Code
Architecting JavaScript Code
Suresh Balla
 
Mastering Java Bytecode With ASM - 33rd degree, 2012
Mastering Java Bytecode With ASM - 33rd degree, 2012Mastering Java Bytecode With ASM - 33rd degree, 2012
Mastering Java Bytecode With ASM - 33rd degree, 2012
Anton Arhipov
 
Unit 3 JAVA Script.pptx
Unit 3 JAVA Script.pptxUnit 3 JAVA Script.pptx
Unit 3 JAVA Script.pptx
meghana092
 

Similar to Add two numbers karan chanana (20)

Javascript ch7
Javascript ch7Javascript ch7
Javascript ch7
 
Javascript - Beyond-jQuery
Javascript - Beyond-jQueryJavascript - Beyond-jQuery
Javascript - Beyond-jQuery
 
Html
HtmlHtml
Html
 
Java.script
Java.scriptJava.script
Java.script
 
Dompletion: DOM-Aware JavaScript Code Completion
Dompletion: DOM-Aware JavaScript Code CompletionDompletion: DOM-Aware JavaScript Code Completion
Dompletion: DOM-Aware JavaScript Code Completion
 
Scala in practice
Scala in practiceScala in practice
Scala in practice
 
Spine JS
Spine JSSpine JS
Spine JS
 
Alert
AlertAlert
Alert
 
Web 6 | JavaScript DOM
Web 6 | JavaScript DOMWeb 6 | JavaScript DOM
Web 6 | JavaScript DOM
 
Do the following program in C++- Create a item class... with and i.pdf
Do the following program in C++- Create a item class... with and i.pdfDo the following program in C++- Create a item class... with and i.pdf
Do the following program in C++- Create a item class... with and i.pdf
 
Javascript variables and datatypes
Javascript variables and datatypesJavascript variables and datatypes
Javascript variables and datatypes
 
Broadleaf Presents Thymeleaf
Broadleaf Presents ThymeleafBroadleaf Presents Thymeleaf
Broadleaf Presents Thymeleaf
 
Java day9n
Java day9nJava day9n
Java day9n
 
The Principle of Hybrid App.
The Principle of Hybrid App.The Principle of Hybrid App.
The Principle of Hybrid App.
 
Form demoinplaywithmysql
Form demoinplaywithmysqlForm demoinplaywithmysql
Form demoinplaywithmysql
 
Advanced php testing in action
Advanced php testing in actionAdvanced php testing in action
Advanced php testing in action
 
course js day 3
course js day 3course js day 3
course js day 3
 
Architecting JavaScript Code
Architecting JavaScript CodeArchitecting JavaScript Code
Architecting JavaScript Code
 
Mastering Java Bytecode With ASM - 33rd degree, 2012
Mastering Java Bytecode With ASM - 33rd degree, 2012Mastering Java Bytecode With ASM - 33rd degree, 2012
Mastering Java Bytecode With ASM - 33rd degree, 2012
 
Unit 3 JAVA Script.pptx
Unit 3 JAVA Script.pptxUnit 3 JAVA Script.pptx
Unit 3 JAVA Script.pptx
 

More from karan chanana (10)

Java script calc karan by karan chanana
Java script calc karan by karan chananaJava script calc karan by karan chanana
Java script calc karan by karan chanana
 
Java script slideshow by karan chanana
Java script slideshow by karan chananaJava script slideshow by karan chanana
Java script slideshow by karan chanana
 
Java script while loop by karan chanana
Java script while loop by karan chananaJava script while loop by karan chanana
Java script while loop by karan chanana
 
Add text on image by karan chanana
Add text on image by karan chananaAdd text on image by karan chanana
Add text on image by karan chanana
 
Accessing data from a simple post by karan chanana
Accessing data from a simple post by karan chananaAccessing data from a simple post by karan chanana
Accessing data from a simple post by karan chanana
 
Adding text to an image by karan chanana
Adding text to an image by karan chananaAdding text to an image by karan chanana
Adding text to an image by karan chanana
 
Karan chanana
Karan chananaKaran chanana
Karan chanana
 
Javascript validation by karan chanana
Javascript validation by karan chananaJavascript validation by karan chanana
Javascript validation by karan chanana
 
Javascript validation karan chanana
Javascript validation karan chananaJavascript validation karan chanana
Javascript validation karan chanana
 
Javascript validation karan
Javascript validation karanJavascript validation karan
Javascript validation karan
 

Recently uploaded

THORACOTOMY . SURGICAL PERSPECTIVES VOL 1
THORACOTOMY . SURGICAL PERSPECTIVES VOL 1THORACOTOMY . SURGICAL PERSPECTIVES VOL 1
THORACOTOMY . SURGICAL PERSPECTIVES VOL 1
DR SETH JOTHAM
 
Circulation through Special Regions -characteristics and regulation
Circulation through Special Regions -characteristics and regulationCirculation through Special Regions -characteristics and regulation
Circulation through Special Regions -characteristics and regulation
MedicoseAcademics
 

Recently uploaded (20)

Final CAPNOCYTOPHAGA INFECTION by Gauri Gawande.pptx
Final CAPNOCYTOPHAGA INFECTION by Gauri Gawande.pptxFinal CAPNOCYTOPHAGA INFECTION by Gauri Gawande.pptx
Final CAPNOCYTOPHAGA INFECTION by Gauri Gawande.pptx
 
Integrated Neuromuscular Inhibition Technique (INIT)
Integrated Neuromuscular Inhibition Technique (INIT)Integrated Neuromuscular Inhibition Technique (INIT)
Integrated Neuromuscular Inhibition Technique (INIT)
 
CNN-based plastic waste detection system
CNN-based plastic waste detection systemCNN-based plastic waste detection system
CNN-based plastic waste detection system
 
World Hypertension Day 17th may 2024 ppt
World Hypertension Day 17th may 2024 pptWorld Hypertension Day 17th may 2024 ppt
World Hypertension Day 17th may 2024 ppt
 
THORACOTOMY . SURGICAL PERSPECTIVES VOL 1
THORACOTOMY . SURGICAL PERSPECTIVES VOL 1THORACOTOMY . SURGICAL PERSPECTIVES VOL 1
THORACOTOMY . SURGICAL PERSPECTIVES VOL 1
 
ANATOMY OF THE LOWER URINARY TRACT AND MALE [Autosaved] [Autosaved].pptx
ANATOMY OF THE LOWER URINARY TRACT AND MALE [Autosaved] [Autosaved].pptxANATOMY OF THE LOWER URINARY TRACT AND MALE [Autosaved] [Autosaved].pptx
ANATOMY OF THE LOWER URINARY TRACT AND MALE [Autosaved] [Autosaved].pptx
 
Young at heart: Cardiovascular health stations to empower healthy lifestyle b...
Young at heart: Cardiovascular health stations to empower healthy lifestyle b...Young at heart: Cardiovascular health stations to empower healthy lifestyle b...
Young at heart: Cardiovascular health stations to empower healthy lifestyle b...
 
Retinal consideration in cataract surgery
Retinal consideration in cataract surgeryRetinal consideration in cataract surgery
Retinal consideration in cataract surgery
 
Creating Accessible Public Health Communications
Creating Accessible Public Health CommunicationsCreating Accessible Public Health Communications
Creating Accessible Public Health Communications
 
PT MANAGEMENT OF URINARY INCONTINENCE.pptx
PT MANAGEMENT OF URINARY INCONTINENCE.pptxPT MANAGEMENT OF URINARY INCONTINENCE.pptx
PT MANAGEMENT OF URINARY INCONTINENCE.pptx
 
NCLEX RN REVIEW EXAM CONTENT BLUE BOOK PDF
NCLEX RN REVIEW EXAM CONTENT BLUE BOOK PDFNCLEX RN REVIEW EXAM CONTENT BLUE BOOK PDF
NCLEX RN REVIEW EXAM CONTENT BLUE BOOK PDF
 
Gauri Gawande(9) Constipation Final.pptx
Gauri Gawande(9) Constipation Final.pptxGauri Gawande(9) Constipation Final.pptx
Gauri Gawande(9) Constipation Final.pptx
 
In-service education (Nursing Mangement)
In-service education (Nursing Mangement)In-service education (Nursing Mangement)
In-service education (Nursing Mangement)
 
Antiplatelets in IHD, Dose Duration, DAPT vs SAPT
Antiplatelets in IHD, Dose Duration, DAPT vs SAPTAntiplatelets in IHD, Dose Duration, DAPT vs SAPT
Antiplatelets in IHD, Dose Duration, DAPT vs SAPT
 
180-hour Power Capsules For Men In Ghana
180-hour Power Capsules For Men In Ghana180-hour Power Capsules For Men In Ghana
180-hour Power Capsules For Men In Ghana
 
Circulation through Special Regions -characteristics and regulation
Circulation through Special Regions -characteristics and regulationCirculation through Special Regions -characteristics and regulation
Circulation through Special Regions -characteristics and regulation
 
DECIPHERING COMMON ECG FINDINGS IN ED.pptx
DECIPHERING COMMON ECG FINDINGS IN ED.pptxDECIPHERING COMMON ECG FINDINGS IN ED.pptx
DECIPHERING COMMON ECG FINDINGS IN ED.pptx
 
Is Rheumatoid Arthritis a Metabolic Disorder.pptx
Is Rheumatoid Arthritis a Metabolic Disorder.pptxIs Rheumatoid Arthritis a Metabolic Disorder.pptx
Is Rheumatoid Arthritis a Metabolic Disorder.pptx
 
Multiple sclerosis diet.230524.ppt3.pptx
Multiple sclerosis diet.230524.ppt3.pptxMultiple sclerosis diet.230524.ppt3.pptx
Multiple sclerosis diet.230524.ppt3.pptx
 
Cervical screening – taking care of your health flipchart (Vietnamese)
Cervical screening – taking care of your health flipchart (Vietnamese)Cervical screening – taking care of your health flipchart (Vietnamese)
Cervical screening – taking care of your health flipchart (Vietnamese)
 

Add two numbers karan chanana

  • 1. Add two numbers <html> <head> <title>Input tutorial</title> <script language="javascript"> function addNumbers() { var val1 = parseInt(document.getElementById("value1").value); var val2 = parseInt(document.getElementById("value2").value); var ansD = document.getElementById("answer"); ansD.value = val1 + val2; } </script> </head> <body> value1 = <input type="text" id="value1" name="value1" value="1"/> value2 = <input type="text" id="value2" name="value2" value="2"/> <input type="button" name="Sumbit" value="Click here" onclick="javascript:addNumbers()"/> Answer = <input type="text" id="answer" name="answer" value=""/> </body> </html>