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)

DOCX
PDF
I mi cargo-1_cad_verde
PDF
Os tapetes para a procissão
PDF
O percebe
PDF
Chalets&amp;Villas
PDF
Elementos de una re1
TXT
Dinesh
PPS
Chega a primavera
PDF
# 32&33
TXT
Novo(a) documento de texto
PDF
My favorites 21
PDF
Marketing Strategies
TXT
alamat web
PDF
ycqkq.pdf
PDF
PPTX
Presentation1
DOC
Dekalogoa 1.e
I mi cargo-1_cad_verde
Os tapetes para a procissão
O percebe
Chalets&amp;Villas
Elementos de una re1
Dinesh
Chega a primavera
# 32&33
Novo(a) documento de texto
My favorites 21
Marketing Strategies
alamat web
ycqkq.pdf
Presentation1
Dekalogoa 1.e
Ad

Similar to Add two numbers bykaran 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 karan 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 karan chanana
Validation using javascripts by karan chanana
Validation using javascripts by karan chanana

Recently uploaded (20)

PPTX
Project Management_ SMART Projects Class.pptx
PPTX
BUSINESS CYCLE_INFLATION AND UNEMPLOYMENT.pptx
PDF
Booking.com The Global AI Sentiment Report 2025
PDF
Solaris Resources Presentation - Corporate August 2025.pdf
PDF
Satish NS: Fostering Innovation and Sustainability: Haier India’s Customer-Ce...
PDF
ICv2 White Paper - Gen Con Trade Day 2025
PDF
THE COMPLETE GUIDE TO BUILDING PASSIVE INCOME ONLINE
PDF
TyAnn Osborn: A Visionary Leader Shaping Corporate Workforce Dynamics
DOCX
80 DE ÔN VÀO 10 NĂM 2023vhkkkjjhhhhjjjj
DOCX
Handbook of Entrepreneurship- Chapter 5: Identifying business opportunity.docx
PDF
Environmental Law Communication: Strategies for Advocacy (www.kiu.ac.ug)
PPTX
interschool scomp.pptxzdkjhdjvdjvdjdhjhieij
PDF
Robin Fischer: A Visionary Leader Making a Difference in Healthcare, One Day ...
PPTX
chapter 2 entrepreneurship full lecture ppt
DOCX
Hand book of Entrepreneurship 4 Chapters.docx
PPT
Lecture notes on Business Research Methods
PDF
income tax laws notes important pakistan
PPTX
2 - Self & Personality 587689213yiuedhwejbmansbeakjrk
PDF
Charisse Litchman: A Maverick Making Neurological Care More Accessible
PDF
PMB 401-Identification-of-Potential-Biotechnological-Products.pdf
Project Management_ SMART Projects Class.pptx
BUSINESS CYCLE_INFLATION AND UNEMPLOYMENT.pptx
Booking.com The Global AI Sentiment Report 2025
Solaris Resources Presentation - Corporate August 2025.pdf
Satish NS: Fostering Innovation and Sustainability: Haier India’s Customer-Ce...
ICv2 White Paper - Gen Con Trade Day 2025
THE COMPLETE GUIDE TO BUILDING PASSIVE INCOME ONLINE
TyAnn Osborn: A Visionary Leader Shaping Corporate Workforce Dynamics
80 DE ÔN VÀO 10 NĂM 2023vhkkkjjhhhhjjjj
Handbook of Entrepreneurship- Chapter 5: Identifying business opportunity.docx
Environmental Law Communication: Strategies for Advocacy (www.kiu.ac.ug)
interschool scomp.pptxzdkjhdjvdjvdjdhjhieij
Robin Fischer: A Visionary Leader Making a Difference in Healthcare, One Day ...
chapter 2 entrepreneurship full lecture ppt
Hand book of Entrepreneurship 4 Chapters.docx
Lecture notes on Business Research Methods
income tax laws notes important pakistan
2 - Self & Personality 587689213yiuedhwejbmansbeakjrk
Charisse Litchman: A Maverick Making Neurological Care More Accessible
PMB 401-Identification-of-Potential-Biotechnological-Products.pdf

Add two numbers bykaran 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>