Domanda [Aiuto] Javascript-html unito al forumfree

Stato
Discussione chiusa ad ulteriori risposte.

ManInBlack

Utente Gold
27 Giugno 2011
360
71
48
231
Sto facendo un Menù laterale a scomparsa per aggiungere dei link.
In poche parole non riesco ad aggiungere altri attributi oltre ai link.
Esempio non riesco ad aprire il link in un'altra scheda e di cambiare colore del link.
Per link intendo: una frase con un collegamento ipertestuale.


<script type="text/javascript"><!--
var moving, menuRows=1, htmlItems='';
function move(b){clearTimeout(moving); if(b<0&&parseInt(Menu.left)>-Width||b>0&&parseInt(Menu.left)<0){moving=setTimeout('move('+b+')',slideSpeed); theleft+=b; Menu.left=theleft+'px'}}
function startMenu(menu,barText){document.write('<div id=ssm style="width:'+(Width+30)+'px; left:-'+(Width)+'px; top:'+Yoffset+'px; '+(isStatic?'':'top:expression('+Yoffset+'+(y=document.body.scrollTop)+\'px\'); position:fixed!important; ')+'position:absolute; z-index:9" onmouseover=move(10) onmouseout="clearTimeout(moving); moving=setTimeout(\'move(-10)\',waitTime)"><table class=mainbg width=100% cellpadding=4 cellspacing=1><tr><td class=title align=center><b>'+menu+'<\/b><td class=ww rowspan='+menuRows+' style="width:20px;padding:4px;font-size:10pt;font-weight:bold" align=center valign=middle>'+barText); Menu=document.getElementById("ssm").style; theleft=-Width}
function addItem(text,link){menuRows++; htmlItems+='<tr><td class=aa><span class=web><a HREF='+link+'>'+text+'<\/a><\/span>'}
function endMenu(){document.write(htmlItems+'<\/table><\/div>')}
if(document.getElementById){

isStatic=false;
Yoffset=100;
Width=130;
slideSpeed=20;
waitTime=500;

addItem("Annunci","http://annunci.it (sito inventato)");
addItem("Annunci","http://annunci.it (sito inventato)");
addItem("Annunci","http://annunci.it (sito inventato)");





startMenu("Menù","M<br>e<br>n<br>ù<br>S<br>I<br>T<br>O<br>!<br>!<br>");

endMenu()}
//--></script>
 
Stato
Discussione chiusa ad ulteriori risposte.