Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ///html:
- <!DOCTYPE html>
- <html>
- <head>
- <title>Aharon Website</title>
- </head>
- <body>
- <div class="mouse" style="background-color: pink; width: 200px; height: 200px; text-align: center;">mouse over me</div>
- <script src="index.js"></script>
- </body>
- </html>
- //js:
- document.querySelector('.mouse').addEventListener('mouseover', function(e){
- e.target.innerHTML = 'Ouch!! <br/>Please go out!';
- });
- document.querySelector('.mouse').addEventListener('mouseover', function(e){
- e.target.innerHTML = 'Thanks';
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement