BOJA Posted November 30, 2006 Report Posted November 30, 2006 function moveover(){ document.getElementById('hom').src="images/home.png"; document.getElementById('new').src="images/news.png"; document.getElementById('down').src="images/downloads.png"; document.getElementById('acc').src="images/account.png"; } function moveback() { document.getElementById('hom').src="btn_home.png"; document.getElementById('new').src="btn_news.png"; document.getElementById('down').src="btn_downloads.png"; document.getElementById('acc').src="btn_account.png"; } kad uzbraucu uz kadu no shiem imagiem man paradas parejiem imagies kkas liidziigs :/ Kaa var atdaliit katru no augshaa mineetaam funkcijam?
andrisp Posted November 30, 2006 Report Posted November 30, 2006 (edited) Ja gribi ar inline onmouseover taisīt, tad veido tās fjas apt. šādi: <script> function change_src(element, img_name) { element.src = img_name; } </script> <img onmouseover="change_src(this, 'attels_kuru_radit.png');" onmouseout="change_src(this, 'attels_kuru_radit.png');" /> PS. Protams, var arī šādi: <img onmouseover="this.src = 'attels_kuru_radit.png';" onmouseout="this.src = 'attels_kuru_radit.png';" /> Bet es ieteiktu vispār neizmantot inline eventus - http://www.google.lv/search?hl=lv&q=un...sive+javascript Edited November 30, 2006 by andrisp
Recommended Posts