BOJA Posted November 30, 2006 Report Share 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? Link to comment Share on other sites More sharing options...
andrisp Posted November 30, 2006 Report Share 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 Link to comment Share on other sites More sharing options...
BOJA Posted December 4, 2006 Author Report Share Posted December 4, 2006 liels paldies izdevas! Link to comment Share on other sites More sharing options...
Recommended Posts