我创建了一个导航菜单,我使用“object”标签插入到我的页面中。每当我单击导航菜单上的链接时,它会将我带到正确的页面,但它位于对象标记内。页面的其余部分保持不变,包括地址栏中的原始地址。我似乎无法找到其他人和我一样的问题。
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
</head>
<link rel="stylesheet" href="/css/body.css" />
<body>
<object id="navigation" type="text/html" data="/includes/inc.nav.php"></object>
<div id='page'>
<div id='pageTitle'>Knowledge Base</div>
<p>Here is the body</p>
</div>
</body>
</html>
inc.nav.php
<link rel="stylesheet" href="/css/navbar.css" />
<ul id="menu">
<li><a href="#">Tickets</a>
<ul>
<li><a href="/vision/tickets.php">BLAH</a></li>
<li><a href="/vision/tickets.php">Haha</a></li>
<li><a href="/vision/tickets.php">Woohoo</a></li>
</ul>
</li>
<li><a href="#">Equipment</a>
<ul>
<li><a href="/vision/trucks.php">Trucks</a></li>
</ul>
</li>
<li><a href="#">Reports</a>
<ul>
<li><a href="/vision/reports.php">Reports</a></li>
<li><a href="/vision/users.php">User List</a></li>
</ul>
</li>
<li><a href="/vision/knowledgebase.php">Knowledge Base</a></li>
<li><a href="#">Logout</a></li>
</ul>
我确信我错过了一些简单的事情。任何帮助将不胜感激。
答案 0 :(得分:0)
Found information on the answer here
链接应如下所示:
<li><a target="_parent" href="/vision/tickets.php">BLAH</a></li>