这框架怎么去定义呢?高人指点下,困惑我好久了,跪谢。

叫我梁大侠 2010-07-18 07:30:00
我想弄一个网站管理的后台,其中的页面我基本设计好了,左边是菜单,右边的就是在点击左边菜单的时候,相应的显示出页面来,我的菜单admin_menu.asp代码如下(在网上找的,树形的):
<script language="JavaScript1.2">
<!--
/**
* Based on Folding Menu Tree
* Dynamic Drive (www.dynamicdrive.com)
* For full source code, installation instructions,
* 100's more DHTML scripts, and Terms Of
* Use, visit dynamicdrive.com
*
* Updated to support arbitrarily nested lists
* by Mark Quinn (mark@robocast.com) November 2nd 1998
*/

var head="display:''"
img1=new Image()
img1.src="fold.gif"
img2=new Image()
img2.src="open.gif"

function change(){
if(!document.all)
return
if (event.srcElement.id=="foldheader" || event.srcElement.id=="foldheader1") {
var srcIndex = event.srcElement.sourceIndex
var nested = document.all[srcIndex+1]
if (nested.style.display=="none") {
nested.style.display=''
event.srcElement.style.listStyleImage="url(open.gif)"
}
else {
nested.style.display="none"
event.srcElement.style.listStyleImage="url(fold.gif)"
}
}
}

document.onclick=change

//-->
</script>
</head>

<body style="background:url(image/admin.jpg) no-repeat left center">

<ul>
<li id="foldheader">首页管理</li>
<ul id="foldinglist" style="display:none">
<li><a href="admin_company_news.asp" target="showframe">公司动态管理</a></li>
<li><a href="admin_guestbook.asp" >客户留言管理</a></li>
<li><a href="../../../www.vancouversun.com/index.html">Vancouver Sun</a></li>
</ul>

<li id="foldheader1">员工管理</li>
<ul id="foldinglist" style="display:none">
<li><a href="../../../www.gamespot.com/index.html">GameSpot</a></li>
<li><a href="../../../www.happypuppy.com/index.html">Happy Puppy</a></li>
<li><a href="../../../www.gamecenter.com/index.html">Game Center</a></li>
</ul>

<li id="foldheader1">图片管理</li>
<ul id="foldinglist" style="display:none">
<li><a href="../../../www.download.com/index.html">outer 1</a></li>
<li><a href="../../../www.hotfiles.com/index.html">outer 2</a></li>
</ul>
<li id="foldheader1">联系管理</li>
<ul id="foldinglist" style="display:none">
<li><a href="../../../www.windows95.com/index.html">nested 1</a></li>
<li><a href="../../../www.shareware.com/index.html">nested 2</a></li>
<li><a href="../../../www.windows95.com/index.html">outer 3</a></li>
<li><a href="../../../www.shareware.com/index.html">outer 4</a></li>
</ul>
</table>
<script language="JavaScript1.2">
<!--
/**
* Get cookie routine by Shelley Powers
* (shelley.powers@ne-dev.com)
*/
function get_cookie(Name) {
var search = Name + "="
var returnvalue = "";
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
// if cookie exists
if (offset != -1) {
offset += search.length
// set index of beginning of value
end = document.cookie.indexOf(";", offset);
// set index of end of cookie value
if (end == -1) end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(offset, end))
}
}
return returnvalue;
}

if (get_cookie(window.location.pathname) != ''){
var openresults=get_cookie(window.location.pathname).split(" ")
for (i=0 ; i < openresults.length ; i++){
foldinglist[openresults[i]].style.display=''
document.all[foldinglist[openresults[i]].sourceIndex -
1].style.listStyleImage="url(open.gif)"
}
}

if (document.all){
var nodelength=foldinglist.length-1
var nodes=new Array(nodelength)
var openones=''
}

function check(){
for (i=0 ; i <= nodelength ; i++){
if (foldinglist[i].style.display=='')
openones=openones + " " + i
}
document.cookie=window.location.pathname+"="+openones
}

if (document.all)
document.body.onunload=check
//-->
</script>
(这是主要的代码)
在点击首页管理,下面就会子菜单 公司动态管理 客户留言管理
我想的就是在一个页面中 在点击子菜单 公司动态管理的时候,在右边显示出该链接页面admin_company_news.asp
我做的是那个页面admin.asp的代码是:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>
<frameset cols="30%,70%">
<frame src="admin_menu.asp">
<frame src="admin_company_news.asp">
</frameset><noframes></noframes>
</html>
用框架来设计的,可是结果却让我惊愕。
高人指点下,跪谢。
...全文
107 4 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
叫我梁大侠 2010-07-19
  • 打赏
  • 举报
回复
可是现在问题又出来,我点击左边菜单的时候,那个背景怎么会变(我自己也说不清楚)我贴下我的那个菜单的全部代码,麻烦高人指点下:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<style type="text/css">
<!--
.style1 {
font-size: 12px;
font-weight: bold;
}
.style2 {
color: #FF0000;
font-family: "方正行楷简体";
font-size: 20px;
}
.style4 {font-size: 12px; font-weight: bold; color: #FF0000; }
.style5 {
font-family: "方正行楷简体";
font-size: 20px;
}
.style6 {font-size: 12px; font-weight: bold; color: #FF0000; font-family: "方正行楷简体"; }
.style7 {font-size: 20px}
.style8 {font-size: 20px; font-weight: bold; color: #FF0000; font-family: "方正行楷简体"; }
-->
</style>
<style>
<!--
#foldheader{cursor:hand ; font-weight:bold ; font-size:12px; padding-top:200px;
list-style-image:url(fold.gif)}
#foldheader1{cursor:hand ; font-weight:bold ; font-size:12px;
list-style-image:url(fold.gif)}
#foldinglist{list-style-image:url(list.gif)}
//#apDiv1 {
position:absolute;
width:200px;
height:115px;
z-index:1;
}
-->
</style>
<script language="JavaScript1.2">
<!--
/**
* Based on Folding Menu Tree
* Dynamic Drive (www.dynamicdrive.com)
* For full source code, installation instructions,
* 100's more DHTML scripts, and Terms Of
* Use, visit dynamicdrive.com
*
* Updated to support arbitrarily nested lists
* by Mark Quinn (mark@robocast.com) November 2nd 1998
*/

var head="display:''"
img1=new Image()
img1.src="fold.gif"
img2=new Image()
img2.src="open.gif"

function change(){
if(!document.all)
return
if (event.srcElement.id=="foldheader" || event.srcElement.id=="foldheader1") {
var srcIndex = event.srcElement.sourceIndex
var nested = document.all[srcIndex+1]
if (nested.style.display=="none") {
nested.style.display=''
event.srcElement.style.listStyleImage="url(open.gif)"
}
else {
nested.style.display="none"
event.srcElement.style.listStyleImage="url(fold.gif)"
}
}
}

document.onclick=change

//-->
</script>
</head>

<body style="background:url(image/admin.jpg) no-repeat left center">

<ul>
<li id="foldheader">首页管理</li>
<ul id="foldinglist" style="display:none">
<li><a href="admin_company_news.asp" target="main">公司动态管理</a></li>
<li><a href="admin_guestbook.asp" target="main" >客户留言管理</a></li>
<li><a href="../../../www.vancouversun.com/index.html">Vancouver Sun</a></li>
</ul>

<li id="foldheader1">员工管理</li>
<ul id="foldinglist" style="display:none">
<li><a href="../../../www.gamespot.com/index.html">GameSpot</a></li>
<li><a href="../../../www.happypuppy.com/index.html">Happy Puppy</a></li>
<li><a href="../../../www.gamecenter.com/index.html">Game Center</a></li>
</ul>

<li id="foldheader1">图片管理</li>
<ul id="foldinglist" style="display:none">
<li><a href="../../../www.download.com/index.html">outer 1</a></li>
<li><a href="../../../www.hotfiles.com/index.html">outer 2</a></li>
</ul>
<li id="foldheader1">联系管理</li>
<ul id="foldinglist" style="display:none">
<li><a href="../../../www.windows95.com/index.html">nested 1</a></li>
<li><a href="../../../www.shareware.com/index.html">nested 2</a></li>
<li><a href="../../../www.windows95.com/index.html">outer 3</a></li>
<li><a href="../../../www.shareware.com/index.html">outer 4</a></li>
</ul>
</table>
<script language="JavaScript1.2">
<!--
/**
* Get cookie routine by Shelley Powers
* (shelley.powers@ne-dev.com)
*/
function get_cookie(Name) {
var search = Name + "="
var returnvalue = "";
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
// if cookie exists
if (offset != -1) {
offset += search.length
// set index of beginning of value
end = document.cookie.indexOf(";", offset);
// set index of end of cookie value
if (end == -1) end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(offset, end))
}
}
return returnvalue;
}

if (get_cookie(window.location.pathname) != ''){
var openresults=get_cookie(window.location.pathname).split(" ")
for (i=0 ; i < openresults.length ; i++){
foldinglist[openresults[i]].style.display=''
document.all[foldinglist[openresults[i]].sourceIndex -
1].style.listStyleImage="url(open.gif)"
}
}

if (document.all){
var nodelength=foldinglist.length-1
var nodes=new Array(nodelength)
var openones=''
}

function check(){
for (i=0 ; i <= nodelength ; i++){
if (foldinglist[i].style.display=='')
openones=openones + " " + i
}
document.cookie=window.location.pathname+"="+openones
}

if (document.all)
document.body.onunload=check
//-->
</script>



</body>
</html>
谢谢
叫我梁大侠 2010-07-19
  • 打赏
  • 举报
回复
恩 谢谢你
beyond_me21 2010-07-18
  • 打赏
  • 举报
回复
菜单的链接加一个target="你的框架的名称", 然后<frame src="admin_company_news.asp">
这里要改成<frame src="admin_company_news.asp" name="你的框架名称">
叫我梁大侠 2010-07-18
  • 打赏
  • 举报
回复
自己帮自己顶下

28,409

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧