পৃষ্ঠাসমূহ

Search Your Article

CS

 

Welcome to GoogleDG – your one-stop destination for free learning resources, guides, and digital tools.

At GoogleDG, we believe that knowledge should be accessible to everyone. Our mission is to provide readers with valuable ebooks, tutorials, and tech-related content that makes learning easier, faster, and more enjoyable.

What We Offer:

  • 📘 Free & Helpful Ebooks – covering education, technology, self-development, and more.

  • 💻 Step-by-Step Tutorials – practical guides on digital tools, apps, and software.

  • 🌐 Tech Updates & Tips – simplified information to keep you informed in the fast-changing digital world.

  • 🎯 Learning Support – resources designed to support students, professionals, and lifelong learners.

    Latest world News 

     

Our Vision

To create a digital knowledge hub where anyone, from beginners to advanced learners, can find trustworthy resources and grow their skills.

Why Choose Us?

✔ Simple explanations of complex topics
✔ 100% free access to resources
✔ Regularly updated content
✔ A community that values knowledge sharing

We are continuously working to expand our content library and provide readers with the most useful and relevant digital learning materials.

📩 If you’d like to connect, share feedback, or suggest topics, feel free to reach us through the Contact page.

Pageviews

Monday, March 20, 2017

XHTML - Events

When users visit a website, they do things such as click on text, images and hyperlinks, hover-over things, etc. These are examples of what JavaScript calls events.
We can write our event handlers in JavaScript or VBScript and can specify these event handlers as a value of event tag attribute. The XHTML 1.0 has a similar set of events which is available in HTML 4.01 specification.

The <body> and <frameset> Level Events

There are only two attributes which can be used to trigger any JavaScript or VBScript code, when any event occurs at document level.
Attribute Value Description
onload Script Script runs when a XHTML document loads.
onunload Script Script runs when a XHTML document unloads.
Note − Here, the script refers to any function or piece of code of VBScript or JavaScript.

The <form> Level Events

There are following six attributes which can be used to trigger any JavaScript or VBScript code when any event occurs at form level.
Attribute Value Description
onchange Script Script executes when the element changes.
onsubmit Script Script executes when the form is submitted.
onreset Script Script executes when the form is reset.
onselect Script Script executes when the element is selected.
onblur Script Script executes when the element loses focus.
onfocus Script Script runs when the element gets focus.

Keyboard Events

The following three events are generated by keyboard. These events are not valid in base, bdo, br, frame, frameset, head, html, iframe, meta, param, script, style, and title elements.
Attribute Value Description
onkeydown Script Script executes on key press.
onkeypress Script Script executes on key press and release.
onkeyup Script Script executes key release.

Other Events

The following seven events are generated by mouse when it comes in contact with any HTML tag. These events are not valid in base, bdo, br, frame, frameset, head, html, iframe, meta, param, script, style, and title elements.
Attribute Value Description
onclick Script Script executes on a mouse click.
ondblclick Script Script executes on a mouse double-click.
onmousedown Script Script executes when mouse button is pressed.
onmousemove Script Script executes when mouse pointer moves.
onmouseout Script Script executes when mouse pointer moves out of an element.
onmouseover Script Script executes when mouse pointer moves over an element.
onmouseup Script Script executes when mouse button is released.

No comments:

Post a Comment