鼠标悬停在标签上有问题

时间:2010-04-11 10:50:14

标签: javascript jquery css dreamweaver

我从互联网上下载了一个网页模板,因为我不知道如何在photoshop上设计网页。这是我下载的那个:http://www.freewebtemplates.com/download/templates/9839 并修改它。 我有这个代码用于鼠标在动态驱动器的标签上。但似乎没有使用我下载的模板。这是我目前的代码:

 <script src="mouseovertabs.js" type="text/javascript">



</script>

<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Designed by Web Page Templates</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<link href="default.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table border="0" align="center" cellpadding="0" cellspacing="0" class="bg1">
    <tr>
        <td class="text1" style="height: 50px;">xd627 information management system</td>
    </tr>

    <tr>
    <div id="mytabsmenu" class="tabsmenuclass">

        <td class="bg5"><table border="0" cellspacing="0" cellpadding="0" style="height: 62px; padding-top: 15px;">
            <tr align="center">
                <td><ul><li><a href="index.html" class="link1">Homepage</a></li></td>
                <td><li><a href="RegStuds.php" class="link1">Database</a></li></td>
                <td><li><a href="#" class="link1">About</a></li> </ul></td>
                <a href="submenucontents.htm" style="visibility:hidden">Sub Menu contents</a>
               <div id="mysubmenuarea" class="tabsmenucontentclass">

<!--1st link within submenu container should point to the external submenu contents file-->
<a href="submenucontents.htm" style="visibility:hidden">Sub Menu contents</a>

</div>

<script type="text/javascript">
//mouseovertabsmenu.init("tabs_container_id", "submenu_container_id", "bool_hidecontentsmouseout")
mouseovertabsmenu.init("mytabsmenu", "mysubmenuarea", true)

</script>
                </div>

这里可能有什么问题,它与我之前的工作完全一致,但根本没有布局:

<script src="mouseovertabs.js" type="text/javascript">

/***********************************************
* Mouseover Tabs Menu- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for this script and 100s more
***********************************************/

</script>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
<div id="mytabsmenu" class="tabsmenuclass">
<ul>
<li><a href="" rel="gotsubmenu[selected]">Database Manipulation</a></li>
<li><a href="" rel="gotsubmenu" >Register User</a></li>
<li><a href="loginform2.php" rel="gotsubmenu" >Logout</a></li>
<li><a href=""></a></li>
</ul>
</div>

<div id="mysubmenuarea" class="tabsmenucontentclass">

<!--1st link within submenu container should point to the external submenu contents file-->
<a href="submenucontents.htm" style="visibility:hidden">Sub Menu contents</a>

</div>

<script type="text/javascript">
//mouseovertabsmenu.init("tabs_container_id", "submenu_container_id", "bool_hidecontentsmouseout")
mouseovertabsmenu.init("mytabsmenu", "mysubmenuarea", true)

</script>
</body>
</html>

1 个答案:

答案 0 :(得分:0)

TR和TD标签之间不应该有任何东西,但这就是你拥有mytabsmenu div的地方。将其移动到页面上的正常区域(可能在TD内),然后再试一次。