Jump to content
  • 0

Проблема со скриптом


apxuyc
 Share

Question

Народ помогите с проблемкой.. Есть меню на js..в Opera и Mozilla...отображается как надо...но в Explorer отображается с отступом.. Че нуна поправить??? Помогите..люди добрые...не знаю как это исправить. :)

Вот код JS

if( parseInt( navigator.appVersion ) >= 3 ) compat = true;
if(compat)
{
I1 = new Image;
I1.src="../images/menu_kond_b.jpg";
I1_1 = new Image;
I1_1.src="../images/menu_kond.jpg";
I2 = new Image;
I2.src="../images/menu_vent_b.jpg";
I2_1 = new Image;
I2_1.src="../images/menu_vent.jpg";
I3 = new Image;
I3.src="../images/menu_ot_b.jpg";
I3_1 = new Image;
I3_1.src="../images/menu_ot.jpg";
I4 = new Image;
I4.src="../images/menu_auto_b.jpg";
I4_1 = new Image;
I4_1.src="../images/menu_auto.jpg";
}
function SetImg(Name,Img)
{
if(compat)
{
document.images[Name].src=eval(Img+'.src');
}
}

Воть код меню в html

<tr>
<td width="300" height="180" valign="top" align="center"><a href="catalog/cond.html" target="_self" ONMOUSEOVER="SetImg('PIC1','I1_1')" ONMOUSEOUT="SetImg('PIC1','I1')"><img src="images/menu_kond_b.jpg" alt="Кондиционирование" name="PIC1" border="0" width="299" height="43" class="border2"></a>
<a href="catalog/vent.html" target="_self" ONMOUSEOVER="SetImg('PIC2','I2_1')" ONMOUSEOUT="SetImg('PIC2','I2')"><img src="images/menu_vent_b.jpg" alt="Вентиляция" name="PIC2" border="0" width="299" height="43" class="border2"></a>
<a href="catalog/otop.html" target="_self" ONMOUSEOVER="SetImg('PIC3','I3_1')" ONMOUSEOUT="SetImg('PIC3','I3')"><img src="images/menu_ot_b.jpg" alt="Отопление" name="PIC3" border="0" width="299" height="43" class="border2"></a>
<a href="catalog/automat.html" target="_self" ONMOUSEOVER="SetImg('PIC4','I4_1')" ONMOUSEOUT="SetImg('PIC4','I4')"><img src="images/menu_auto_b.jpg" alt="Автоматика" name="PIC4" border="0" width="299" height="43" class="border2"></a>
</td>

Вот так отображает в Opera:

06wWsw4W16.jpg

А вот так в Explorer:

JutngSD2JZ.jpg

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. See more about our Guidelines and Privacy Policy