Just nu i M3-nätverket
Jump to content

Problem med Netscape 6


VBA

Recommended Posts

Kort fråga:

- Denna kod ändrar textfärgen på webbsidan, men det fungerar inte i Netscape 6. Vad gör jag för fel?

 

<form>

<input type="button" name="knapp" value="Byt textfärg" onclick=document.fgColor="red">

</form>

Link to comment
Share on other sites

Gör så här...

<form>
<input type="button" name="knapp" value="Byt textfärg" onclick='
if(document.body)
   document.body.style.color = "red";
else
   document.fgColor="red";
'>
</form>

 

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.



×
×
  • Create New...