×

Html & Html5

it training classes Logo

The World's best Software Development Study Portal

JavaScript Events



Javascript has events to provide a dynamic interface to a webpage.

javascript's interaction is handled through events that occur when the user or the browser manipulates a page.

When the page loads, it is called an event. When the user clicks a button, that click is an event. Other examples include events like pressing any key, closing a window, resizing a window, etc.

1.Click event

2.Mouseover event

3.Focus event

4.Keydown event

5.Load event

<script>

function clickevent()

{

document.write("IT TRAINING Classes Institute");

}

</script>

<form>

<input type="button" onclick="clickevent()" value="Who's this?"/>

</form>

--------------------------------------------------------------------------------------------

Output

Example-mouseoverevent



<script>

function mouseoverevent()

{

alert("ITC TRAINING CLASSES");

}

</script>

<p onmouseover="mouseoverevent()"> Keep cursor over me</p>

Output

Keep cursor over me









JS training insitute | Best IT Training classes in Gurgaon | Web Designing Training Institute