mam takyto jednoduchy kod
Kód:
<ul>
<li class="sel1"><a href="#" onclick='changeText()'>menu1</a></li>
<li class="sel2" ><a href="#" onclick='changeText2()' >menu2</a></li>
</ul>
<div id='obsah'></div>
a javascript
Kód:
function changeText(){
document.getElementById('obsah').innerHTML = '<style type="text/css">ul li.sel1 a{width: 55px;height:17px;background-image: url("images/tab_on.jpg");}</style><p>blablabla</p>';}
function changeText2(){
document.getElementById('obsah').innerHTML = '<style type="text/css">ul li.sel2 a{width: 55px;height:17px;background-image: url("images/tab_on.jpg");}</style><p>blablabla</p>';}
Po kliknuti na menu1 sa zobrazi blablabla v DIV obsah. Problem je, ze v IE ignpruje tie styly definovane v javascripte. Vo FF a Opere to funguje dobre, ale IE vobec nezmeni styl. Viete pomoct?