我的网页加了个框架,分了三行,我想在中间那个显示链接,却出现了问??救救我吧!!

soyan 2005-02-23 01:27:41
我中间的那个框架的NAME=MID
在同一个网页上所的链接的target属性都填的是MID
其它的链接都可以在中显示
但就是有一个链接出了问题,
它开始是可以在中间那个框架显示的
但一旦按了这个链接,再按同一个页面的所有链接(在没按那个链接前它们都是正常的,也是就能在中间那个框架显示)就新开一个窗口显示了

谢先
...全文
117 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
dsclub 2005-02-24
  • 打赏
  • 举报
回复
问题就出在这里:

self.name = "main"; // names current window as "main"

把这个窗口的名字给改成"main"了,所以再用target="mid"就不得而知了,自然的就会弹出一个新的窗口。

懂了?
shan1119 2005-02-24
  • 打赏
  • 举报
回复
dd
sfgdwso 2005-02-23
  • 打赏
  • 举报
回复
看不到没明白是什么意思,
孟子E章 2005-02-23
  • 打赏
  • 举报
回复
贴你的“一旦按了这个链接”的代码
soyan 2005-02-23
  • 打赏
  • 举报
回复
<tr>
<td align="right">
<div id="font2">选择头像:</div></td>
<td>
<select style="FONT: 8pt verdana"
onChange=ShowSuzyPic(regform.SuzyDropdown.options.selectedIndex);
size=1 name=SuzyDropdown>
<script language=javascript>
TotalImages = PicVar;
for (loop=0; loop < TotalImages; loop++)
{
document.write("<option value=" + SuzyArray[loop].PicVal + ">" + SuzyArray[loop].TitVal + "</option>");
}
</script>
</select>
</td>
</tr>
<tr>
<td align="right">
<div id="font2">自定义头像地址:</div></td>
<td colspan="2">
<div id="font4"><input type="text" name="dphoto" size="18" maxlength="20" value="<%=rst("photo")%>">
可以在这里给出你自定义头像的 URL 地址</div></td>
<tr valign="top">
<td width="114" align="right" valign="top">
<div id="font2">电子邮件:</div></td>
<td colspan="2">
<input type="text" name="email" size="25" maxlength="100" value="<%=rst("email")%>">
</td>
</tr>
<tr valign="top">
<td width="114" align="right" >
<div id="font2">出生日期:</div></td>
<td colspan="2">
<div id="font4"><input type="text" name="BirthYear" size="5" maxlength="4" value="<%=rst("birthyear")%>">年
<input type="text" name="BirthMonth" size="3" maxlength="2" value="<%=rst("birthmonth")%>">月
<input type="text" name="BirthDay" size="3" maxlength="2" value="00">
日</div></td>
</tr>
<tr valign="top">
<td width="114" align="right" >
<div id="font2">工作城市:</div></td>
<td colspan="2">
<div id="font4"><input type="text" name="city" size="18" maxlength="20" value="<%=rst("city")%>">
您现在所在的城市</div></td>
</tr>
<tr valign="top">
<td width="114" align="right" >
<div id="font2">移动电话:</div></td>
<td colspan="2">
<input type="text" name="mobil" size="18" maxlength="20" value="<%=rst("mobil")%>">
</td>
</tr>
<tr valign="top">
<td width="114" align="right">
<div id="font2">OICQ:</div></td>
<td colspan="2">
<input type="text" name="oicq" size="18" maxlength="20" value="<%=rst("oicq")%>">
</td>
</tr>
<tr valign="top">
<td width="114" align="right" valign="top"> </td>
<td>
<input type="submit" name="ret" value="同意" class="anniu">
</td>
<td>
<input type="reset" name="ret" value="重填" class="anniu">
</td>
</tr>
</table></td>
</tr>
</table>
</form></td>
</tr>
</table>
<%
If Request("Ret")="同意" Then
pass=TRIM(Request.form("password1"))
photo=TRIM(Request.form("SuzyDropdown"))
dphoto=TRIM(Request.form("dphoto"))
email=TRIM(Request.form("email"))
BirthYear=Request.form("BirthYear")
BirthDay=Request.form("BirthDay")
BirthMonth=Request.form("BirthMonth")
city=TRIM(Request.form("city"))
mobil=TRIM(Request.form("mobil"))
oicq=TRIM(Request.form("oicq"))
Session("pass")=pass
rst("password")=Session("pass")
if dphoto<>"" then
rst("photo")=dphoto
else
rst("photo")=photo
end if
rst("email")=email
rst("birthyear")=BirthYear
rst("birthmonth")=BirthMonth
rst("birthday")=BirthDay
rst("city")=city
rst("mobil")=mobil
rst("oicq")=oicq
rst.Update
Response.write "修改成功!!"
end if
%>
<%
end if
%>
<table width="404" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center">◆copyright ©2005-2-12 酒坛子版权所有 请勿复制◆</td>
</tr>
</table>
<p> </p>
</div>
</body>
</html>
soyan 2005-02-23
  • 打赏
  • 举报
回复
if (screen.width < wid || screen.height < hei) {

wid = screen.width - 50;

hei = screen.height - 50;

}

}

function FindPic() {

TotalFound = 0;

SearchString = document.regform.SearchWord.value;

SearchString = SearchString.toLowerCase();

WriteResults = window.open("clear.html","resultwindow","height=300, width=300, toolbar=0, status=0, menubar=0, resizable=1, scrollbars=1");

WriteResults.document.open();

WriteResults.document.write('<div style="text-align:center; font:8pt verdana">'

+ 'You searched for:<br><i>' + SearchString + '</i><br><b>Results:</b><br>');

for (loop=0; loop < PicVar ; loop++) {

Keyword = Keyword.toLowerCase();

URL = SuzyArray[loop].PicVal;

title = SuzyArray[loop].TitVal;

title = title.toLowerCase();

SearchResult = Keyword.indexOf(SearchString);

SearchResult2 = title.indexOf(SearchString);

if (SearchResult != "-1" || SearchResult2 != "-1") {

last = current;

WriteResults.document.write('<br><a href=javascript:ShowSuzyPic(' + loop + '); target="main">' + title + '</a>');

TotalFound++;

}

}

WriteResults.document.write('<p><b>Returned ' + TotalFound + ' results.</b>');

WriteResults.document.close();

if(javascript_version > 1.0) {

//delay a bit here because IE4 encounters errors

//when trying to focus a recently opened window

setTimeout('WriteResults.focus();',250);

}
}

// -->
</script>
<%
name=Session("Name")
if Session("Name")="" then
Response.Write "对不起,您没有登录无法找到您的资料!!"
Response.end
else
set Conn=Server.CreateObject("ADODB.Connection")
PS="Provider=Microsoft.Jet.OLEDB.4.0;Data Source="_
& Server.MapPath("user.mdb")
Conn.open PS
MySQL="select * from userimf where ID='"& name &"'"
Set rst=Server.CreateObject("ADODB.Recordset")
rst.open MySQL,Conn,2,2

%>
<table width="534" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="534">
<div align="center" id="font1">用户资料修改</div></td>
</tr>
</table>
<table width="536" border="0" cellpadding="0" cellspacing="0" bordercolor="#00CCFF">
<tr>
<td width="600"><form method="post" name="regform" onSubmit="return check();">
<table width="536" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="536" height="66"> <table width="100%" border="1" cellpadding="0" cellspacing="2" bordercolor="#00CCFF">
<tr>
<td width="114" align="right">
<div id="font2">用户名:</div></td>
<td width="151">
<input type="text" name="username" size="18" maxlength="20" value="<%=rst("ID")%>" disabled="1">
</td>
<td width="263" rowspan="4">
<div id=SuzySpot>   <img src="<%=rst("photo")%>" width="90" height="100"></div></td>
</tr>
<tr>
<td align="right">
<div id="font2">密码:</div></td>
<td>
<input type="password" name="password1" size="18" maxlength="20" value="">
</td>
</tr>
<tr>
<td align="right">
<div id="font2">确认密码:</div></td>
<td>
<input type="password" name="password2" size="18" maxlength="20" value="">
</td>
</tr>
soyan 2005-02-23
  • 打赏
  • 举报
回复
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>酒坛子-用户资料修改</title>
<link rel="stylesheet" type="text/css" href="css/style.css">
</head>

<body background="image/bbs_center_bg.gif">
<div align="center">
<script language=JavaScript>
function check()
{
if (document.regform.username.value.length==0){
alert("请输入用户名!");
document.regform.username.focus();
return false;}
if (document.regform.password1.value.length==0){
alert("请输入密码!");
document.regform.Password1.focus();
return false;}
if (document.regform.password2.value.length==0){
alert("请输入确认密码!");
document.regform.Password2.focus();
return false;}
if(document.regform.password1.value!=document.regform.password2.value)
{
alert("您的密码不匹配");
return false;
}
if(document.regform.SuzyDropdown.value.length==0)
{
if (document.regform.dphoto.value.length==0)
alert("您必须填写选择头像或者自定义头像的其中一栏");
return false;
}
if(document.regform.email.value.length==0)
{
alert("请写出您的电子信箱");
return false;
}
if(document.regform.city.value.length==0)
{
alert("请告诉我您现在住在哪儿");
return false;
}
if(document.regform.mobil.value.length==0)
{
alert("请告诉我您的电话,以好联系你去FB");
return false;
}
if(document.regform.city.value.length==0)
{
alert("请告诉我您现在住在哪儿");
return false;
}
if(document.regform.oicq.value.length==0)
{
alert("请告诉我您的OICQ");
return false;
}
return true;
}
</script>

<script language=javascript>
self.name = "main"; // names current window as "main"

PicVar = 0;

// Object Fix

function Fix(PicVal, TitVal) {

this.PicVal = PicVal

this.TitVal = TitVal

}

// Create new main array.

var SuzyArray = new Array()

// The following lines are the ONLY LINES in this whole script that you need to change!

// SuzyArray[PicVar++] = new Fix("picname.jpg", "pic title",)
SuzyArray[PicVar++] = new Fix( "", "有你喜欢的吗")

SuzyArray[PicVar++] = new Fix( "photo/ycg.jpg", "颜传贵")

SuzyArray[PicVar++] = new Fix( "photo/hqy.jpg", "黄权宜")

SuzyArray[PicVar++] = new Fix("photo/scq.jpg", "苏超强")

SuzyArray[PicVar++] = new Fix( "photo/csh.jpg", "陈少晖")

SuzyArray[PicVar++] = new Fix( "photo/wdh.jpg", "韦丹晖")

SuzyArray[PicVar++] = new Fix( "photo/cxj.jpg", "陈晓军")

SuzyArray[PicVar++] = new Fix( "photo/njs.jpg", "农家胜")

SuzyArray[PicVar++] = new Fix("photo/mrh.jpg", "马瑞华")

SuzyArray[PicVar++] = new Fix("photo/whj.jpg", "韦海坚")

SuzyArray[PicVar++] = new Fix("photo/gjq.jpg", "郭接全")

SuzyArray[PicVar++] = new Fix("photo/yzc.jpg", "杨泽聪")

SuzyArray[PicVar++] = new Fix("photo/hl.jpg", "黄亮")

SuzyArray[PicVar++] = new Fix("photo/lzl.jpg", "李哲理")

SuzyArray[PicVar++] = new Fix("photo/ctg.jpg", "曹天贵")

SuzyArray[PicVar++] = new Fix("photo/wl.jpg", "王力")

last = PicVar - 1;

current = 0;

function ShowSuzyPic(newpic) {

// (not working on some browsers) document.playsound.play();

current = newpic;

SelectionBox = document.regform.SuzyDropdown;

SelectionBox.options[current].selected = true;

document.getElementById("SuzySpot").innerHTML = '<a href=javascript:SuzyPicRemote("' + SuzyArray[current].PicVal + '","last");><img name="PicShowing" src=' + SuzyArray[current].PicVal + ' height=100 width=90 border=0></a>';


}

function RandomSuzyPic() {

randompic = Math.floor(Math.random()*PicVar);

last = current;

ShowSuzyPic(randompic);

}

function PreviousSuzyPic() {

last = current;

current--;

if(current<0) current = PicVar - 1;

ShowSuzyPic(current);

}

function NextSuzyPic() {

last = current;

TotalImages = document.regform.SuzyDropdown.options.length;

current++;

if (current>=PicVar) current = 0;

ShowSuzyPic(current);

}

function SuzyPicRemote(picName,whichPic) {

ShowingImage = new Image();


ShowingImage.src = picName;

wid = ShowingImage.width + 50;

hei = ShowingImage.height + 50;

if (wid < 30 || hei < 30) {

wid=650;

hei=490;

}

61,110

社区成员

发帖
与我相关
我的任务
社区描述
层叠样式表(英文全称:Cascading Style Sheets)是一种用来表现HTML(标准通用标记语言的一个应用)或XML(标准通用标记语言的一个子集)等文件样式的计算机语言。
社区管理员
  • HTML(CSS)社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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