Tutorial Details
- Judul: javascripth mouse over
- Difficulty: Beginner
- Platform: -
- Bahasa Scripth: Javascript
- Software : -
- Estimated Completion Time: 15 minutes
- Created:Ricko Nada (Pustaka Flash)
live demo :
- Pustaka flash- actionscript3
- Pustaka flash- actionscript2
- Pustaka flash- PHP
- Pustaka flash- Mysql
Scripth yang digunakan :
<ul> <li>Pustaka flash- actionscript3</li> <li>Pustaka flash- actionscript2</li> <li>Pustaka flash- PHP</li> <li>Pustaka flash- Mysql</li> </ul> <script type="text/javascript"><!-- var elm_li = document.getElementsByTagName('li'); // gets all the <li> tags // function to execute when the mouseover is triggered function over() { // sets a background color to the curent element this.style.background = '#07da08'; } // function to execute when the mouseout is triggered function out() { // remove the background color of the curent element this.style.background = 'none'; } // traverse the object with the LI elements for(var i=0; i<elm_li.length; i++) { // register mouseover and mouseout to each LI elm_li[i].addEventListener('mouseover', over, true); elm_li[i].addEventListener('mouseout', out, false); } --></script>
5 Halaman yang sering dikunjungi:
0 komentar:
Post a Comment