Компьютерный форум OSzone.net  

Компьютерный форум OSzone.net (http://forum.oszone.net/index.php)
-   Вебмастеру (http://forum.oszone.net/forumdisplay.php?f=22)
-   -   JS - style.background (http://forum.oszone.net/showthread.php?t=31430)

Ginger 08-12-2003 16:44 215245

в поиске подобной темы не нашла

пишу функцию:
Код:

function arr()
{
document.getElementById('me').style.background-image="img/arr.gif";
document.getElementById('me').style.background-repeat="no-repeat";
document.getElementById('me').style.background-position="right";
}
function arr_ov()
{
document.getElementById('me').style.background-image="img/arr-ov.gif";
document.getElementById('me').style.background-repeat="no-repeat";
document.getElementById('me').style.background-position="right";
}

в бодях:
<div class="m" id="me" onMouseOver="arr_ov()" onMouseOut="arr()"><a href="#">bla</a></div>

говорит на этой линии, где <div> в char 1: object expected.
а на линии - document.getElementById('me').style.background-image="img/arr.gif";
синтаксическая ошибка... что-то я смотрела и не вижу..

что-то не пойму... - он либо не умеет рисовать style.background-... , или я не понимаю, что ему надо...

[s]Исправлено: Ginger, 17:47 8-12-2003[/s]

Agent Comanche 09-12-2003 02:33 215246

Правильно так - backgroundImage, backgroundRepeat...

Ginger 09-12-2003 02:50 215247

Agent Comanche
ок
спасиб.
я правда решила эту проблему простым css...

и
onMouseOver="this.className='klas'"


Время: 23:37.

Время: 23:37.
© OSzone.net 2001-