Salve io ho un problema, ho creato uno script che all'hover su di un link produce un suono (niente di eccezionale) solo che io vorrei che finisse di produrre il suono anche quando levo il mouse da sopra il link, tipo http://www.karimrashid.com/ (lo so che è in flash ma speravo si potesse fare anche in js)
Il mio codice è:
codice:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title></title> <script language="javascript" type="text/javascript"> function playSound(soundfile) { document.getElementById("dummy").innerHTML= "<embed src=\""+soundfile+"\" hidden=\"false\" autostart=\"true\" loop=\"false\" />"; } </script> <style> p { float:left; } </style> </head> <body> <span id="dummy"></span> <p onmouseover="playSound('note/x0.au');">[img]images/tasto1.png[/img]</p> <p onmouseover="playSound('note/x1.au');">[img]images/tasto2.png[/img]</p> <p onmouseover="playSound('note/x2.au');">[img]images/tasto3.png[/img]</p> <p onmouseover="playSound('note/x3.au');">[img]images/tasto4.png[/img]</p> <p onmouseover="playSound('note/x4.au');">[img]images/tasto5.png[/img]</p> <p onmouseover="playSound('note/x5.au');">[img]images/tasto6.png[/img]</p> <p onmouseover="playSound('note/x6.au');">[img]images/tasto7.png[/img]</p> <p onmouseover="playSound('note/x7.au');">[img]images/tasto8.png[/img]</p> <p onmouseover="playSound('note/x8.au');">[img]images/tasto9.png[/img]</p> </body> </html>