各位高人,本人摸着做了一个网页,由于展示的是多个小视频文件,做了弹出小网页,可是当我点第二个链接时,网页弹出不在当前,而在主网页的后面,这样会认人以为没有链接,实在查了很多资料,多找不到解决办法,请那位大师帮本人看一下病因,在下感激不尽!下面为代码,由于本人对代码实在太不懂了,所以全部发了上来,麻烦大家了!
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<script type="text/JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
//-->
</script>
</head><body>
<table width="528" border="0" cellpadding="0" cellspacing="0" class="字体">
<!--DWLayoutTable-->
<tr>
<td width="230" height="125" valign="top"><table width="80%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="230" height="100" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="100" height="70" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="100" height="70" valign="top"><a href="javascript:;" target="_top" onClick="MM_openBrWindow('zp/jg0201.html','广州君易广告有限公司','width=500,height=400 top')"><img src="images/14/can`t-take-my-eye-off-u.gif" alt="2" width="100" height="70" border="0" /></a></td>
</tr>
</table></td>
</tr>
<tr>
<td height="14"><div align="center"><a href="javascript:;" onClick="MM_openBrWindow('zp/jg0201.html','广州君易广告有限公司','width=500,height=400 top')"> can`t take my eye off u</a></div></td>
</tr>
</table></td>
</tr>
<!--DWLayoutTable-->
</table></td>
<td width="160" valign="top"><table width="45%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="155" height="100" valign="top"><table width="42%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="142" height="70" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="100" height="70" valign="top"><a href="javascript:;" target="_parent" onClick="MM_openBrWindow('zp/jg0202.html','广州君易广告有限公司','width=500,height=400')"><img src="images/14/加工片07.gif" alt="2" width="100" height="70" border="0" /></a></td>
</tr>
</table></td>
</tr>
<tr>
<td height="14"><div align="center"><a href="javascript:;" onClick="MM_openBrWindow('zp/jg0202.html','广州君易广告有限公司','width=500,height=400')">加工片07 </a></div></td>
</tr>
</table></td>
</tr>
<!--DWLayoutTable-->
</table></td>
<td width="470" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="172" height="100" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="100" height="70" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="100" height="70" valign="top"><a href="zp0203.html"></a><a href="javascript:;" target="_parent" onClick="MM_openBrWindow('zp/jg0203.html','广州君易广告有限公司','width=500,height=400')"><img src="images/14/越夜越有机.gif" alt="2" width="100" height="70" border="0" /></a></td>
</tr>
</table></td>
</tr>
<tr>
<td height="14"><div align="center"><a href="zp0203.html"></a><a href="javascript:;" onClick="MM_openBrWindow('zp/jg0203.html','广州君易广告有限公司','width=500,height=400')">越夜越有机 </a></div></td>
</tr>
</table></td>
</tr>
<!--DWLayoutTable-->
</table></td>
</tr>
</table>
</body>
</html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<script type="text/JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
//-->
</script>
</head><body>
<table width="528" border="0" cellpadding="0" cellspacing="0" class="字体">
<!--DWLayoutTable-->
<tr>
<td width="230" height="125" valign="top"><table width="80%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="230" height="100" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="100" height="70" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="100" height="70" valign="top"><a href="javascript:;" target="_top" onClick="MM_openBrWindow('zp/jg0201.html','广州君易广告有限公司','width=500,height=400 top')"><img src="images/14/can`t-take-my-eye-off-u.gif" alt="2" width="100" height="70" border="0" /></a></td>
</tr>
</table></td>
</tr>
<tr>
<td height="14"><div align="center"><a href="javascript:;" onClick="MM_openBrWindow('zp/jg0201.html','广州君易广告有限公司','width=500,height=400 top')"> can`t take my eye off u</a></div></td>
</tr>
</table></td>
</tr>
<!--DWLayoutTable-->
</table></td>
<td width="160" valign="top"><table width="45%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="155" height="100" valign="top"><table width="42%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="142" height="70" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="100" height="70" valign="top"><a href="javascript:;" target="_parent" onClick="MM_openBrWindow('zp/jg0202.html','广州君易广告有限公司','width=500,height=400')"><img src="images/14/加工片07.gif" alt="2" width="100" height="70" border="0" /></a></td>
</tr>
</table></td>
</tr>
<tr>
<td height="14"><div align="center"><a href="javascript:;" onClick="MM_openBrWindow('zp/jg0202.html','广州君易广告有限公司','width=500,height=400')">加工片07 </a></div></td>
</tr>
</table></td>
</tr>
<!--DWLayoutTable-->
</table></td>
<td width="470" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="172" height="100" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="100" height="70" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="100" height="70" valign="top"><a href="zp0203.html"></a><a href="javascript:;" target="_parent" onClick="MM_openBrWindow('zp/jg0203.html','广州君易广告有限公司','width=500,height=400')"><img src="images/14/越夜越有机.gif" alt="2" width="100" height="70" border="0" /></a></td>
</tr>
</table></td>
</tr>
<tr>
<td height="14"><div align="center"><a href="zp0203.html"></a><a href="javascript:;" onClick="MM_openBrWindow('zp/jg0203.html','广州君易广告有限公司','width=500,height=400')">越夜越有机 </a></div></td>
</tr>
</table></td>
</tr>
<!--DWLayoutTable-->
</table></td>
</tr>
</table>
</body>
</html>
target="_blank"
谢谢,试过了不行!一点击之后会弹出两个网页,一个网页地址栏会显示:javascript:;发表于:2008-02-19 10:29:445楼 得分:0
定位下窗口焦点 ? 谢谢,什么意思?
给段代码你,可以参考
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title> dhtml.window.simulateMinimize.html </title>
<meta name="generator" content="editplus" />
<meta name="author" content="Gao YiXiang" />
<meta name="email" content="[email protected]" />
<meta name="keywords" content="javascript dhtml dom" />
<meta name="description" content="I love web development." />
</head>
<body>
<h3> 窗体打开后 自动最小化、6 秒后自动还原!注:IE6sp1, FF2单窗口模式下测试可用。 </h3>
<div id="divShow"> </div>
<script type="text/javascript">
<!--
var iTimeoutForMinimize = 0;
var iTimeoutForResume = 5; //可以不用这部分,这部分是还原的,你把他相关的代码删掉就是最小化的了 var oShow = document.getElementById("divShow");
showMessage();
var iTimerID = setInterval(showMessage, 1000);
setTimeout(minimizeWindow, 1000*iTimeoutForMinimize); function showMessage()
{
oShow.innerHTML = "Minimize current window after " + iTimeoutForMinimize-- + " seconds.";
}
function minimizeWindow()
{
clearInterval(iTimerID);
resizeTo(0, 0);
moveTo(screen.availWidth, screen.availHeight);
setTimeout(resumeWindow, 1000*iTimeoutForResume);
}
function resumeWindow()
{
moveTo(-4, -4);
resizeTo(screen.availWidth, screen.availHeight);
}
//-->
</script>
</body>
var win=window.open(theURL,winName,features);
win.focus();
}
var win=window.open(theURL,winName,features);
win.focus();
} 代码加在哪里
建议:一般不用中文命名窗口名字,改成字母吧!
回答者:丘晓强 - 助理 二级 2-22 16:25这样就是对的