With out using DOM Function we can apply JavaScript Inline Event Effect:
Example:-
<body>
<p>Keep Mouse Pointer on below heading!</p>
<h2 onmouseover="this.style.color='red'; this.style.backgroundColor='yellow'; this.style.padding='12px';" onMouseOut="this.style.color='green'; this.style.backgroundColor='pink'; this.style.padding='12px';">Welcome TO JS DOM Functions</h2>
</body>
Output:-
Keep Mouse Pointer on below heading!
Example:-
<body>
<p>Keep Mouse Pointer on below heading!</p>
<h2 onmouseover="this.style.color='red'; this.style.backgroundColor='yellow'; this.style.padding='12px';" onMouseOut="this.style.color='green'; this.style.backgroundColor='pink'; this.style.padding='12px';">Welcome TO JS DOM Functions</h2>
</body>
Output:-
Keep Mouse Pointer on below heading!
No comments:
Post a Comment