我试图让这个垂直列表加载我在 Onclick 事件期间放入 Load_content() 的文档标题。令人满意的结果将是每次我点击一个新链接......一个新的 PDF 加载到 iframe
<html>
<head>
<title> Literature of Andrew Willis
</title>
<link rel="stylesheet" href="mycss.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="css/cssverticalmenu.css" />
<script language="javascript" type="text/javascript">
function load_content (link) {
document.getElementById("iframe").setAttribute("src","link" );
}
</script>
</head>
<body>
<div id="logo">
<a href="#"><img src="mainlogo.jpg" height=100 width=400></a>
</div>
<div id="content">
<div id="leftcolumn">
<ul class="glossymenu">
<li><a href="#" onclick="load_content(Look at me now.pdf)">Short Essays</a></li>
<li><a href="#" onclick="load_content(hangmansdog.pdf)" >Poetry</a></li>
<li><a href="http://www.pourinpourout.com" >Blog</a></li>
</ul>
</div>
<div id="rightcolumn">
<div id="content">
<iframe id="iframe1" src="#"></iframe>
</div>
</div>
</div>
</body>