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

PDF
J querypractice
DOCX
PowerShell Script to add multiple users to a group in AD
PDF
Introducing jQuery
PPTX
Iterators & generators: practical uses in memory management
DOCX
Php update and delet operation
PDF
Accessible Ajax on Rails
PDF
React 101
PPTX
Introduction to react and redux
J querypractice
PowerShell Script to add multiple users to a group in AD
Introducing jQuery
Iterators & generators: practical uses in memory management
Php update and delet operation
Accessible Ajax on Rails
React 101
Introduction to react and redux

What's hot (16)

PPTX
PPT
jQuery Beginner
PPTX
mediator
PPT
J Query Public
PPTX
Introduction to jQuery - The basics
PPTX
Web technology javascript
PDF
Enterprise workflow with Apps Script
KEY
Grails UI Primer
PPTX
mediator
PPTX
Building complex User Interfaces with Sitecore and React
DOC
Marcus Portfolio
PDF
ThingMaker in Swift
KEY
Scala on Your Phone
PPTX
Ajax for dummies, and not only.
PDF
Stay with React.js in 2020
jQuery Beginner
mediator
J Query Public
Introduction to jQuery - The basics
Web technology javascript
Enterprise workflow with Apps Script
Grails UI Primer
mediator
Building complex User Interfaces with Sitecore and React
Marcus Portfolio
ThingMaker in Swift
Scala on Your Phone
Ajax for dummies, and not only.
Stay with React.js in 2020
Ad

Viewers also liked (20)

PDF
SITE_PLAN
PDF
Dell-Desktops
PDF
2013 Bianca Steinmann scanned
PDF
Sun Ra_Relix
PDF
Irene Course PD NOV2910PDCIRE05 V Lubbe
PPTX
PDF
Sicard chip eletrônico
DOCX
Atividades quimica
PDF
Model de comentari de text
DOC
PDF
Fiable IT Portfolio-SMTP Checker
PDF
MBB Renewal Form (+ ADD GIFT)
PDF
Dia da mãe 2012
PPT
Direito m..
PDF
Programacao fct 2011
PDF
Livro redd-no-brasil
PPS
As Sete Maravilhas
PDF
Ficha de trabajo la ciencia historica (2)
SITE_PLAN
Dell-Desktops
2013 Bianca Steinmann scanned
Sun Ra_Relix
Irene Course PD NOV2910PDCIRE05 V Lubbe
Sicard chip eletrônico
Atividades quimica
Model de comentari de text
Fiable IT Portfolio-SMTP Checker
MBB Renewal Form (+ ADD GIFT)
Dia da mãe 2012
Direito m..
Programacao fct 2011
Livro redd-no-brasil
As Sete Maravilhas
Ficha de trabajo la ciencia historica (2)
Ad

Similar to Add two numbers karan chanana (20)

PPTX
Function and Object in Java Script .pptx
PPTX
Data and information about anatical subject
PPTX
Javascript ch7
TXT
Html
TXT
Java.script
PPTX
Dompletion: DOM-Aware JavaScript Code Completion
PDF
Scala in practice
PDF
Spine JS
PDF
Web 6 | JavaScript DOM
PDF
Do the following program in C++- Create a item class... with and i.pdf
PPSX
Javascript variables and datatypes
PDF
Broadleaf Presents Thymeleaf
TXT
Java day9n
KEY
The Principle of Hybrid App.
PPT
Form demoinplaywithmysql
PDF
Advanced php testing in action
PPTX
course js day 3
PPTX
Architecting JavaScript Code
Function and Object in Java Script .pptx
Data and information about anatical subject
Javascript ch7
Html
Java.script
Dompletion: DOM-Aware JavaScript Code Completion
Scala in practice
Spine JS
Web 6 | JavaScript DOM
Do the following program in C++- Create a item class... with and i.pdf
Javascript variables and datatypes
Broadleaf Presents Thymeleaf
Java day9n
The Principle of Hybrid App.
Form demoinplaywithmysql
Advanced php testing in action
course js day 3
Architecting JavaScript Code

More from karan info (11)

DOCX
Accessing data from a simple post by karan chanana
DOCX
Karan chanana
DOCX
Java script while loop by karan chanana
DOCX
Java script errors by karan chanana
DOCX
Add text on image by karan chanana
DOCX
Accessing data from a simple post by karan chanana
DOCX
Adding text to an image by karan chanana
DOCX
Karan chanana
DOCX
Add two numbers bykaran chanana
DOCX
Validation using javascripts by karan chanana
DOCX
Validation using javascripts by karan chanana
Accessing data from a simple post by karan chanana
Karan chanana
Java script while loop by karan chanana
Java script errors by karan chanana
Add text on image by karan chanana
Accessing data from a simple post by karan chanana
Adding text to an image by karan chanana
Karan chanana
Add two numbers bykaran chanana
Validation using javascripts by karan chanana
Validation using javascripts by karan chanana

Recently uploaded (20)

PPTX
basic introduction to research chapter 1.pptx
PDF
Charisse Litchman: A Maverick Making Neurological Care More Accessible
PPT
Lecture notes on Business Research Methods
PPTX
Astra-Investor- business Presentation (1).pptx
PDF
THE COMPLETE GUIDE TO BUILDING PASSIVE INCOME ONLINE
PDF
Introduction to Generative Engine Optimization (GEO)
PPTX
BUSINESS CYCLE_INFLATION AND UNEMPLOYMENT.pptx
PDF
Solaris Resources Presentation - Corporate August 2025.pdf
PPTX
Board-Reporting-Package-by-Umbrex-5-23-23.pptx
PDF
TyAnn Osborn: A Visionary Leader Shaping Corporate Workforce Dynamics
DOCX
Hand book of Entrepreneurship 4 Chapters.docx
PDF
Daniels 2024 Inclusive, Sustainable Development
PPTX
Slide gioi thieu VietinBank Quy 2 - 2025
PDF
ICv2 White Paper - Gen Con Trade Day 2025
PDF
Susan Semmelmann: Enriching the Lives of others through her Talents and Bless...
PPTX
operations management : demand supply ch
DOCX
Center Enamel A Strategic Partner for the Modernization of Georgia's Chemical...
DOCX
Center Enamel Powering Innovation and Resilience in the Italian Chemical Indu...
PPTX
IITM - FINAL Option - 01 - 12.08.25.pptx
PDF
NISM Series V-A MFD Workbook v December 2024.khhhjtgvwevoypdnew one must use ...
basic introduction to research chapter 1.pptx
Charisse Litchman: A Maverick Making Neurological Care More Accessible
Lecture notes on Business Research Methods
Astra-Investor- business Presentation (1).pptx
THE COMPLETE GUIDE TO BUILDING PASSIVE INCOME ONLINE
Introduction to Generative Engine Optimization (GEO)
BUSINESS CYCLE_INFLATION AND UNEMPLOYMENT.pptx
Solaris Resources Presentation - Corporate August 2025.pdf
Board-Reporting-Package-by-Umbrex-5-23-23.pptx
TyAnn Osborn: A Visionary Leader Shaping Corporate Workforce Dynamics
Hand book of Entrepreneurship 4 Chapters.docx
Daniels 2024 Inclusive, Sustainable Development
Slide gioi thieu VietinBank Quy 2 - 2025
ICv2 White Paper - Gen Con Trade Day 2025
Susan Semmelmann: Enriching the Lives of others through her Talents and Bless...
operations management : demand supply ch
Center Enamel A Strategic Partner for the Modernization of Georgia's Chemical...
Center Enamel Powering Innovation and Resilience in the Italian Chemical Indu...
IITM - FINAL Option - 01 - 12.08.25.pptx
NISM Series V-A MFD Workbook v December 2024.khhhjtgvwevoypdnew one must use ...

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>