Jump to content
СофтФорум - всё о компьютерах и не только

Проблема с передачей аргументов


Recommended Posts

Есть скрипт, который должен через промежеток времени показывать слой и через промежеток времени скрывать слой.

С определенно заданным именем слоя он пашет, а по другому нет.

Код :

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">

<title>Добро Пожаловать</title>

<script language="javascript" type="text/javascript">

var i = 0;

// ----------------------------

var speed_show = 50; // промежеток времени через который появится меню

var speed_hide = 1200; // промежеток времени через который скроется меню

// ----------------------------

function overmenu(id)

{

var divid = id;

if (i < 1)

{

i++;

window.setTimeout("overmenu()",speed_show);

}

else

{

document.getElementById(divid).className = "menubar";

}

}

function outmenu(id)

{

var asdid

if (i > 0)

{

i--;

timerid = window.setTimeout("outmenu()",speed_hide);

}

else

{

document.getElementById(asdid).className = "menubar01";

}

}

function overmenubar(id)

{

clearInterval(timerid);

i = 1;

document.getElementById(id).className = "menubar";

}

</script>

<style type="text/css">

a {

color: #000000;

text-decoration: none;

}

.menubar01 {

width: 200px;

margin-left: 0px;

margin-top: 0px;

position: absolute;

background-color: #666666;

visibility: hidden;

}

.menubar {

width: 200px;

margin-left: 0px;

margin-top: 5px;

position: absolute;

background-color: #666666;

filter: alpha(opacity=80);

visibility: visible;

border-width: 2px;

}

.menubar a {

width: 100%;

background-color: #666666;

color: #FFFFFF;

font-size: 14px;

font-family: Arial, Helvetica, sans-serif;

text-decoration: none;

display: block;

padding-left: 2px;

}

.menubar a:hover {

width: 100%;

background-color: #333333;

color: #FFFFFF;

font-size: 14px;

font-family: Arial, Helvetica, sans-serif;

text-decoration: none;

display: block;

padding-left: 2px;

}

</style>

</head>

<body>

<table border="0" cellpadding="0" cellspacing="0" width="350">

<tr>

<td width="116"><a href="#" onmouseover="overmenu('menubar01')" onmouseout="outmenu('menubar01')">Link 01</a></td>

<td width="116"><a href="#" onmouseover="overmenu('menubar02')" onmouseout="outmenu('menubar02')">Link 02</a></td>

<td width="116"><a href="#" onmouseover="overmenu('menubar03')" onmouseout="outmenu('menubar03')">Link 03</a></td>

</tr>

<tr>

<td width="116"><div class="menubar01" id="menubar01" onmouseover="overmenubar(''menubar01')" onmouseout="outmenu(''menubar01')"><a href="http://www.sony.ru/">menubar 01</a><a href="#">menubar 01</a><a href="#">menubar 01</a><a href="#">menubar 01</a><a href="#">menubar 01</a></div></td>

<td width="116"><div class="menubar01" id="menubar02"><a href="#">menubar 01</a><a href="#">menubar 01</a><a href="#">menubar 01</a><a href="#">menubar 01</a><a href="#">menubar 01</a></div></td>

<td width="116"><div class="menubar01" id="menubar03"><a href="#">menubar 01</a><a href="#">menubar 01</a><a href="#">menubar 01</a><a href="#">menubar 01</a><a href="#">menubar 01</a></div></td>

</tr>

</table>

<img src="feature_quad_sli.jpg" width="500" height="300">

</body>

</html>

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...