SlideShare a Scribd company logo
1 of 19
HTML EVENTS WITH JAVA
SCRIPT
S.B.S.Younus, M.Sc., M.Phil., NET.,
Assistant Professor,
Department of Computer Science,
KR College of Arts and Science,
Kovilpatti.
HTML Events
 HTML stands for Hypertext Markup Language
 HTML events are "things" that happen to
HTML elements
 When JavaScript is used in HTML pages,
JavaScript can "react" on these events
 An HTML event can be something the browser
does, or something a user does
 Examples of HTML events:
An HTML web page has finished loading
An HTML input field was changed
An HTML button was clicked
 Often, when events happen, you may want to
do something
 JavaScript lets you execute code when events
are detected
 HTML allows event handler attributes, with
JavaScript code, to be added to HTML
elements
onclick Event
 This is the most frequently used event type
 It occurs when a user clicks the left button
of his mouse
 We can put our validation, warning etc.,
against this event type
Example Script
 The following script (EventJS.html) creates a
webpage with single button. When you press
the button it will show the dialog box
 When you click the button the onclick() event
will occur
 In the following script the red colored text
refers the javascript
 Type the following script in a notepad and
save it with the extension .html. After this, just
double click the file, it will run on the browser.
Script – EventJS.html
<html>
<head>
<title>
Java Script Events
</title>
<script type = “text/javascript”>
function saySalaam()
{
alert(“Asalaam")
}
</script>
</head>
<body>
<input type = "button" onclick = “saySalaam()" value = “Click Here" />
</form>
</body>
</html>
Output – Before Press Click
Button
Output – After Press Click
Button
HTML 5 Standard Events
Html events with javascript
Html events with javascript
Html events with javascript
Html events with javascript
Html events with javascript
Html events with javascript
Html events with javascript
Html events with javascript
Html events with javascript
Html events with javascript

More Related Content

What's hot (20)

jQuery
jQueryjQuery
jQuery
 
HTML CSS JS in Nut shell
HTML  CSS JS in Nut shellHTML  CSS JS in Nut shell
HTML CSS JS in Nut shell
 
HTML5 audio & video
HTML5 audio & videoHTML5 audio & video
HTML5 audio & video
 
Html forms
Html formsHtml forms
Html forms
 
Event In JavaScript
Event In JavaScriptEvent In JavaScript
Event In JavaScript
 
Intro to html 5
Intro to html 5Intro to html 5
Intro to html 5
 
Java Script ppt
Java Script pptJava Script ppt
Java Script ppt
 
Introduction to JavaScript
Introduction to JavaScriptIntroduction to JavaScript
Introduction to JavaScript
 
JavaScript
JavaScriptJavaScript
JavaScript
 
Html forms
Html formsHtml forms
Html forms
 
Introduction to Javascript
Introduction to JavascriptIntroduction to Javascript
Introduction to Javascript
 
JavaScript Programming
JavaScript ProgrammingJavaScript Programming
JavaScript Programming
 
3. Java Script
3. Java Script3. Java Script
3. Java Script
 
Form Validation in JavaScript
Form Validation in JavaScriptForm Validation in JavaScript
Form Validation in JavaScript
 
Object Oriented Javascript
Object Oriented JavascriptObject Oriented Javascript
Object Oriented Javascript
 
Html
HtmlHtml
Html
 
Javascript
JavascriptJavascript
Javascript
 
Java script
Java scriptJava script
Java script
 
Jsp ppt
Jsp pptJsp ppt
Jsp ppt
 
Css Ppt
Css PptCss Ppt
Css Ppt
 

Similar to Html events with javascript

5 .java script events
5 .java script   events5 .java script   events
5 .java script eventschauhankapil
 
types of events in JS
types of events in JS types of events in JS
types of events in JS chauhankapil
 
FYBSC IT Web Programming Unit III Events and Event Handlers
FYBSC IT Web Programming Unit III Events and Event HandlersFYBSC IT Web Programming Unit III Events and Event Handlers
FYBSC IT Web Programming Unit III Events and Event HandlersArti Parab Academics
 
Upstate CSCI 450 WebDev Chapter 9
Upstate CSCI 450 WebDev Chapter 9Upstate CSCI 450 WebDev Chapter 9
Upstate CSCI 450 WebDev Chapter 9DanWooster1
 
Introj Query Pt2
Introj Query Pt2Introj Query Pt2
Introj Query Pt2kshyju
 
13. session 13 introduction to dhtml
13. session 13   introduction to dhtml13. session 13   introduction to dhtml
13. session 13 introduction to dhtmlPhúc Đỗ
 
06 win forms
06 win forms06 win forms
06 win formsmrjw
 
Client side scripting using Javascript
Client side scripting using JavascriptClient side scripting using Javascript
Client side scripting using JavascriptBansari Shah
 
Advance Java Programming(CM5I) Event handling
Advance Java Programming(CM5I) Event handlingAdvance Java Programming(CM5I) Event handling
Advance Java Programming(CM5I) Event handlingPayal Dungarwal
 
DHTML - Events & Buttons
DHTML - Events  & ButtonsDHTML - Events  & Buttons
DHTML - Events & ButtonsDeep Patel
 
Introduction to Javascript programming
Introduction to Javascript programmingIntroduction to Javascript programming
Introduction to Javascript programmingFulvio Corno
 
Web of Things at Liverpool MakeFest
Web of Things at Liverpool MakeFestWeb of Things at Liverpool MakeFest
Web of Things at Liverpool MakeFestPatrick John McGee
 
IoT Ultimate Session
IoT Ultimate SessionIoT Ultimate Session
IoT Ultimate SessionDamir Dobric
 
Event Handling in Java
Event Handling in JavaEvent Handling in Java
Event Handling in JavaAyesha Kanwal
 

Similar to Html events with javascript (20)

5 .java script events
5 .java script   events5 .java script   events
5 .java script events
 
types of events in JS
types of events in JS types of events in JS
types of events in JS
 
FYBSC IT Web Programming Unit III Events and Event Handlers
FYBSC IT Web Programming Unit III Events and Event HandlersFYBSC IT Web Programming Unit III Events and Event Handlers
FYBSC IT Web Programming Unit III Events and Event Handlers
 
Upstate CSCI 450 WebDev Chapter 9
Upstate CSCI 450 WebDev Chapter 9Upstate CSCI 450 WebDev Chapter 9
Upstate CSCI 450 WebDev Chapter 9
 
Introj Query Pt2
Introj Query Pt2Introj Query Pt2
Introj Query Pt2
 
13. session 13 introduction to dhtml
13. session 13   introduction to dhtml13. session 13   introduction to dhtml
13. session 13 introduction to dhtml
 
Event handling in Java(part 1)
Event handling in Java(part 1)Event handling in Java(part 1)
Event handling in Java(part 1)
 
Ext Js Events
Ext Js EventsExt Js Events
Ext Js Events
 
Ext Js Events
Ext Js EventsExt Js Events
Ext Js Events
 
Event
EventEvent
Event
 
06 win forms
06 win forms06 win forms
06 win forms
 
Client side scripting using Javascript
Client side scripting using JavascriptClient side scripting using Javascript
Client side scripting using Javascript
 
Advance Java Programming(CM5I) Event handling
Advance Java Programming(CM5I) Event handlingAdvance Java Programming(CM5I) Event handling
Advance Java Programming(CM5I) Event handling
 
DHTML - Events & Buttons
DHTML - Events  & ButtonsDHTML - Events  & Buttons
DHTML - Events & Buttons
 
Web programming
Web programmingWeb programming
Web programming
 
Introduction to Javascript programming
Introduction to Javascript programmingIntroduction to Javascript programming
Introduction to Javascript programming
 
Web of Things at Liverpool MakeFest
Web of Things at Liverpool MakeFestWeb of Things at Liverpool MakeFest
Web of Things at Liverpool MakeFest
 
IoT Ultimate Session
IoT Ultimate SessionIoT Ultimate Session
IoT Ultimate Session
 
Event Handling in Java
Event Handling in JavaEvent Handling in Java
Event Handling in Java
 
Event handling
Event handlingEvent handling
Event handling
 

More from YounusS2

Babel Compiler - Transforming JavaScript for All Browsers.pptx
Babel Compiler - Transforming JavaScript for All Browsers.pptxBabel Compiler - Transforming JavaScript for All Browsers.pptx
Babel Compiler - Transforming JavaScript for All Browsers.pptxYounusS2
 
Basic Building Blocks of Internet of Things.
Basic Building Blocks of Internet of Things.Basic Building Blocks of Internet of Things.
Basic Building Blocks of Internet of Things.YounusS2
 
Normalization in RDBMS.pptx
Normalization in RDBMS.pptxNormalization in RDBMS.pptx
Normalization in RDBMS.pptxYounusS2
 
Contextual Classes SBS.pptx
Contextual Classes SBS.pptxContextual Classes SBS.pptx
Contextual Classes SBS.pptxYounusS2
 
Topology by SBS.pptx
Topology by SBS.pptxTopology by SBS.pptx
Topology by SBS.pptxYounusS2
 
Bootstrap by SBS.pptx
Bootstrap by SBS.pptxBootstrap by SBS.pptx
Bootstrap by SBS.pptxYounusS2
 
Cloud by SBS.pptx
Cloud by SBS.pptxCloud by SBS.pptx
Cloud by SBS.pptxYounusS2
 
Digital twin
Digital twinDigital twin
Digital twinYounusS2
 
Education Definitions
Education DefinitionsEducation Definitions
Education DefinitionsYounusS2
 
Python & Data Science
Python & Data SciencePython & Data Science
Python & Data ScienceYounusS2
 
Deep learning: Mathematical Perspective
Deep learning: Mathematical PerspectiveDeep learning: Mathematical Perspective
Deep learning: Mathematical PerspectiveYounusS2
 

More from YounusS2 (12)

Babel Compiler - Transforming JavaScript for All Browsers.pptx
Babel Compiler - Transforming JavaScript for All Browsers.pptxBabel Compiler - Transforming JavaScript for All Browsers.pptx
Babel Compiler - Transforming JavaScript for All Browsers.pptx
 
Basic Building Blocks of Internet of Things.
Basic Building Blocks of Internet of Things.Basic Building Blocks of Internet of Things.
Basic Building Blocks of Internet of Things.
 
Normalization in RDBMS.pptx
Normalization in RDBMS.pptxNormalization in RDBMS.pptx
Normalization in RDBMS.pptx
 
Contextual Classes SBS.pptx
Contextual Classes SBS.pptxContextual Classes SBS.pptx
Contextual Classes SBS.pptx
 
Topology by SBS.pptx
Topology by SBS.pptxTopology by SBS.pptx
Topology by SBS.pptx
 
Bootstrap by SBS.pptx
Bootstrap by SBS.pptxBootstrap by SBS.pptx
Bootstrap by SBS.pptx
 
Cloud by SBS.pptx
Cloud by SBS.pptxCloud by SBS.pptx
Cloud by SBS.pptx
 
Digital twin
Digital twinDigital twin
Digital twin
 
Education Definitions
Education DefinitionsEducation Definitions
Education Definitions
 
Education
EducationEducation
Education
 
Python & Data Science
Python & Data SciencePython & Data Science
Python & Data Science
 
Deep learning: Mathematical Perspective
Deep learning: Mathematical PerspectiveDeep learning: Mathematical Perspective
Deep learning: Mathematical Perspective
 

Recently uploaded

WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2
 
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2
 
WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...
WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...
WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...WSO2
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareJim McKeeth
 
WSO2CON 2024 - Designing Event-Driven Enterprises: Stories of Transformation
WSO2CON 2024 - Designing Event-Driven Enterprises: Stories of TransformationWSO2CON 2024 - Designing Event-Driven Enterprises: Stories of Transformation
WSO2CON 2024 - Designing Event-Driven Enterprises: Stories of TransformationWSO2
 
WSO2CON 2024 Slides - Unlocking Value with AI
WSO2CON 2024 Slides - Unlocking Value with AIWSO2CON 2024 Slides - Unlocking Value with AI
WSO2CON 2024 Slides - Unlocking Value with AIWSO2
 
AzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdf
AzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdfAzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdf
AzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdfryanfarris8
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2
 
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2
 
WSO2CON 2024 - Building a Digital Government in Uganda
WSO2CON 2024 - Building a Digital Government in UgandaWSO2CON 2024 - Building a Digital Government in Uganda
WSO2CON 2024 - Building a Digital Government in UgandaWSO2
 
WSO2Con2024 - GitOps in Action: Navigating Application Deployment in the Plat...
WSO2Con2024 - GitOps in Action: Navigating Application Deployment in the Plat...WSO2Con2024 - GitOps in Action: Navigating Application Deployment in the Plat...
WSO2Con2024 - GitOps in Action: Navigating Application Deployment in the Plat...WSO2
 
BusinessGPT - Security and Governance for Generative AI
BusinessGPT  - Security and Governance for Generative AIBusinessGPT  - Security and Governance for Generative AI
BusinessGPT - Security and Governance for Generative AIAGATSoftware
 
WSO2CON 2024 - Software Engineering for Digital Businesses
WSO2CON 2024 - Software Engineering for Digital BusinessesWSO2CON 2024 - Software Engineering for Digital Businesses
WSO2CON 2024 - Software Engineering for Digital BusinessesWSO2
 
[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypse
[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypse[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypse
[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypseTomasz Kowalczewski
 
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...WSO2
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024VictoriaMetrics
 
WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...
WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...
WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...WSO2
 
WSO2Con2024 - Software Delivery in Hybrid Environments
WSO2Con2024 - Software Delivery in Hybrid EnvironmentsWSO2Con2024 - Software Delivery in Hybrid Environments
WSO2Con2024 - Software Delivery in Hybrid EnvironmentsWSO2
 

Recently uploaded (20)

WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
 
WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...
WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...
WSO2CON 2024 - IoT Needs CIAM: The Importance of Centralized IAM in a Growing...
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
WSO2CON 2024 - Designing Event-Driven Enterprises: Stories of Transformation
WSO2CON 2024 - Designing Event-Driven Enterprises: Stories of TransformationWSO2CON 2024 - Designing Event-Driven Enterprises: Stories of Transformation
WSO2CON 2024 - Designing Event-Driven Enterprises: Stories of Transformation
 
WSO2CON 2024 Slides - Unlocking Value with AI
WSO2CON 2024 Slides - Unlocking Value with AIWSO2CON 2024 Slides - Unlocking Value with AI
WSO2CON 2024 Slides - Unlocking Value with AI
 
AzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdf
AzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdfAzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdf
AzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdf
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
 
WSO2CON 2024 - Building a Digital Government in Uganda
WSO2CON 2024 - Building a Digital Government in UgandaWSO2CON 2024 - Building a Digital Government in Uganda
WSO2CON 2024 - Building a Digital Government in Uganda
 
WSO2Con2024 - GitOps in Action: Navigating Application Deployment in the Plat...
WSO2Con2024 - GitOps in Action: Navigating Application Deployment in the Plat...WSO2Con2024 - GitOps in Action: Navigating Application Deployment in the Plat...
WSO2Con2024 - GitOps in Action: Navigating Application Deployment in the Plat...
 
BusinessGPT - Security and Governance for Generative AI
BusinessGPT  - Security and Governance for Generative AIBusinessGPT  - Security and Governance for Generative AI
BusinessGPT - Security and Governance for Generative AI
 
WSO2CON 2024 - Software Engineering for Digital Businesses
WSO2CON 2024 - Software Engineering for Digital BusinessesWSO2CON 2024 - Software Engineering for Digital Businesses
WSO2CON 2024 - Software Engineering for Digital Businesses
 
[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypse
[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypse[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypse
[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypse
 
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 
WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...
WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...
WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...
 
WSO2Con2024 - Software Delivery in Hybrid Environments
WSO2Con2024 - Software Delivery in Hybrid EnvironmentsWSO2Con2024 - Software Delivery in Hybrid Environments
WSO2Con2024 - Software Delivery in Hybrid Environments
 
Abortion Pill Prices Boksburg [(+27832195400*)] 🏥 Women's Abortion Clinic in ...
Abortion Pill Prices Boksburg [(+27832195400*)] 🏥 Women's Abortion Clinic in ...Abortion Pill Prices Boksburg [(+27832195400*)] 🏥 Women's Abortion Clinic in ...
Abortion Pill Prices Boksburg [(+27832195400*)] 🏥 Women's Abortion Clinic in ...
 

Html events with javascript

  • 1. HTML EVENTS WITH JAVA SCRIPT S.B.S.Younus, M.Sc., M.Phil., NET., Assistant Professor, Department of Computer Science, KR College of Arts and Science, Kovilpatti.
  • 2. HTML Events  HTML stands for Hypertext Markup Language  HTML events are "things" that happen to HTML elements  When JavaScript is used in HTML pages, JavaScript can "react" on these events  An HTML event can be something the browser does, or something a user does
  • 3.  Examples of HTML events: An HTML web page has finished loading An HTML input field was changed An HTML button was clicked  Often, when events happen, you may want to do something  JavaScript lets you execute code when events are detected  HTML allows event handler attributes, with JavaScript code, to be added to HTML elements
  • 4. onclick Event  This is the most frequently used event type  It occurs when a user clicks the left button of his mouse  We can put our validation, warning etc., against this event type
  • 5. Example Script  The following script (EventJS.html) creates a webpage with single button. When you press the button it will show the dialog box  When you click the button the onclick() event will occur  In the following script the red colored text refers the javascript  Type the following script in a notepad and save it with the extension .html. After this, just double click the file, it will run on the browser.
  • 6. Script – EventJS.html <html> <head> <title> Java Script Events </title> <script type = “text/javascript”> function saySalaam() { alert(“Asalaam") } </script> </head> <body> <input type = "button" onclick = “saySalaam()" value = “Click Here" /> </form> </body> </html>
  • 7. Output – Before Press Click Button
  • 8. Output – After Press Click Button