找回密码
 立即注册
搜索
查看: 212|回复: 4

求一个网页代码

[复制链接]

107

主题

670

回帖

1048

积分

金牌会员

积分
1048
发表于 2003-5-24 18:15:05 | 显示全部楼层 |阅读模式
本人做网页的时候需要一个代码,就是左右框架结构的网页,中间的分隔栏上面有一个按钮,可以选择显示或者隐藏左边的窗口那种

77

主题

1600

回帖

2372

积分

荣誉版主

A Newbie

积分
2372
发表于 2003-5-25 01:34:08 | 显示全部楼层
新浪BBS是一个典型的例子,研究一下这段代码,那个changeWin()是起关键作用的。


<html><head>
<meta http-equiv="content-type" content="text/html; charset=gb2312">
<title>新浪论坛_新浪网</title>
<style type=text/css>
.o1{position:absolute; font-family:Webdings; background-color:#255ca9; font-size:12px; color:#ffffff; cursor:hand;}
</style>

<script language="javascript" src="http://image2.sina.com.cn/dailynews/timelog.js"></script>

<script language=javascript>
document.domain="sina.com.cn";
function changeWin(){
        if(parent.forum.cols != "13,*"){
                parent.forum.cols = "13,*";
                document.all.menuSwitch.innerHTML = "<font class=o1>4</font>";
        }
        else{
                parent.forum.cols = "145,*";
                document.all.menuSwitch.innerHTML = "<font class=o1>3</font>";
        }
}
</script>
</head>

<body onload='javascript:log_start("forum")' onunload='javascript:log_over("forum");' topmargin=0 marginheight=0 leftmargin=0 marginwidth=0 bgcolor=#d0d0c8>
<table width=100% height=100% border=0 cellpadding=0 cellspacing=0>
<tr><td width=100%><iframe id=forumList name=forumList style="height:100%; width:100%; visibility:inherit;" scrolling=no frameborder=0 src="/publish/groups/menu.html"></iframe></td>
<td bgcolor=#000000><img src=images/c.gif width=1 height=1><td>
<td bgcolor=#ffffff><img src=images/c.gif width=1 height=1><td>
<td bgcolor=#d0d0c8>
        <table width=100% height=100% border=0 cellpadding=0 cellspacing=0>
        <tr><td height=22 onclick=changeWin()><img src=images/c.gif width=10 height=1></td></tr>
        <tr><td onclick=forumList.changeStyle(); id=viewSwitch><font class=o1>5</font></td></tr>
        <tr><td onclick=changeWin() height=100% id=menuSwitch><font class=o1>3</font></td></tr>
        </table></td></tr>
</table>

</body></html>
回复

使用道具 举报

107

主题

670

回帖

1048

积分

金牌会员

积分
1048
 楼主| 发表于 2003-5-25 15:37:31 | 显示全部楼层
<html>
<meta http-equiv="Content-Type" content="text/html;charset=gb2312">
<SCRIPT>
function switchSysBar(){
if (switchPoint.innerText==3){
switchPoint.innerText=4
document.all("frmTitle").style.display="none"
}else{
switchPoint.innerText=3
document.all("frmTitle").style.display=""
}}
</SCRIPT>
<BODY scroll=no style=MARGIN:0px>
<TABLE border=0 cellPadding=0 cellSpacing=0 height=100% width=696>
<TBODY><TR><TD align=middle id=frmTitle noWrap vAlign=center width="120">
<IFRAME frameBorder=0 src=tools.htm style=HEIGHT:100%;VISIBILITY:inherit;WIDTH:110px;Z-INDEX:2 target="main"></IFRAME>
<TD bgColor=#BEB9B4 width="12">
<TABLE border=0 cellPadding=0 cellSpacing=0 height=100%>
<TBODY><tr><TD onclick=switchSysBar() style=HEIGHT:100%;>
<font style=COLOR:white;CURSOR:hand;FONT-FAMILY:Webdings;FONT-SIZE:9pt>
<SPAN id=switchPoint>3</SPAN>
</TBODY></TABLE></TD><TD style=WIDTH:564>
<title>Ten Garden </title>
<IFRAME frameBorder=0 id=main src=main.htm style=HEIGHT:100%;VISIBILITY:inherit;WIDTH:100%;Z-INDEX:1></IFRAME>
</TR></TBODY></TABLE></html>
回复

使用道具 举报

107

主题

670

回帖

1048

积分

金牌会员

积分
1048
 楼主| 发表于 2003-5-25 15:38:37 | 显示全部楼层
我用了YUZI的BBS 3000框架结构,但是单击左边窗口中的链接在右边窗口打开,Help Me!
回复

使用道具 举报

327

主题

3264

回帖

3641

积分

荣誉版主

积分
3641
发表于 2003-5-25 16:39:18 | 显示全部楼层
哦,这个应该是 target 没有设置正确。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|海浩社区

GMT+8, 2025-9-21 18:16 , Processed in 0.079875 second(s), 20 queries .

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

快速回复 返回顶部 返回列表