一个网址如何同时显示两个页面? 一个网址如何同时显示两个页面,像http://www.ifeng.com一样,打开主页面时同时打开一个广告页面,但这两个页面都是显示http://www.ifeng.com一个网址,请问在asp.net下如何实现?谢谢。如果给出一个详细的案例就不胜感激了 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 框架可以实现。或者是在一个页面中放个iframe也可以。欢迎光临 我的博客 http://www.zlblogs.com load事件中加上.window.open(); 凤凰网的代码backwindow_oPopWin = window.open("",backwindow_name,"left=4000"+",top=3000"+",width=10,height=10,scrollbars=no,location=no,status=no" ); 在主界面中放一个iframe<iframe style="height:784px;width:600px;margin:0;padding:0;" frameborder="0" name="show" src="home.aspx"></iframe>其他页面都显示在这个iframe里,即超链接的target设为iframe的name即可<a href='manageUsers.aspx' target=\"show\">用户管理</a><a href='informationAudit.aspx' target=\"show\">信息审核管理</a> 采用内框架应该是你的首选,请不要用 FrameSet,因为这个东东在有些浏览器中是不被支持的。 不是框架做出来的。显然不是那么简单。他用了Flash··这点我很肯定···具体点就不知道了。 <head runat="server"> <title></title> <script src="js/jquery.js" type="text/javascript"></script> <script type="text/javascript"> function openWeb() { window.open('http://www.baidu.com', '_blank', 'height=500, width=700'); } </script></head><body onload="openWeb()"> <form id="form1" runat="server"> </form></body> 不就是flash吗?没看到哪里有2个页面 凤凰的那个弹窗只显示一次,第二次就不出来了,看一下这个文件:http://y1.ifengimg.com/index/ifengRotatorAd.js/*RotatorADAuthor: [email protected]格式: new RotatorAD(商业广告数组, 垫底广告数组, 层id);商业广告数组[资源url,弹出链接url,排期开始时间,排期结束时间,轮播权值]说明: 每次访问根据权值随机出现;自动过滤过期广告;无商业广告时,轮播垫底广告*/if(typeof(RotatorAD)!='function'){var RotatorAD = function(rad,ifengAd,div_id){var date = new Date();var w = rad.width;//广告的宽度var h = rad.height;//广告高度var curIndex=0;var ary = new Array();//过滤过期广告for(var i=0; i<rad.length; i++){ var strStart = rad[i][2].replace('<startdate>','').replace('</startdate>',''); var strEnd = rad[i][3].replace('<enddate>','').replace('</enddate>',''); var start = strToDate(strStart); var end = strToDate(strEnd); if((date>start || strStart=="" ) && (date<end || strEnd=="" ) ){ ary.push([rad[i][0], rad[i][1], rad[i][4]?rad[i][4]:1]);//([资源url,弹出链接url,轮播权值:默认为1)] }}//补垫底广告if(ary.length==0){ for(var i=0; i<ifengAd.length; i++){ ary.push([ifengAd[i][0], ifengAd[i][1],1]); }}//根据权重计算得到广告索引号//ary.sort(function(x,y){return x[2]<y[2];});//根据权重升序排序 IE FF 两者对此方法的排序算法不一致,弃用!//冒泡排序ary = BubbleSort(ary);curIndex = GetAdIndexByRandomAndWeight(ary);//根据权重随机抽取要显示的广告索引号,权重越大抽取到的概率越大//显示 ADvar type = ary[curIndex][0].substring(ary[curIndex][0].lastIndexOf (".")).toLowerCase();var resUrl = ary[curIndex][0];var linkUrl = ary[curIndex][1];var od = document.getElementById(div_id);if(od){ if(type=='.swf'){ od.innerHTML = getFlashString(resUrl,linkUrl); }else if(type=='.jpg' || type=='.gif'){ od.innerHTML = '<a href="'+linkUrl+'" target="_blank"><img src="'+resUrl+'" border="0" width="'+w+'" height="'+h+'" /></a>'; }else if(type=='.html' || type=='.tml'|| type=='.html'){ od.innerHTML = '<iframe id="ifm_'+div_id+'" frameborder="0" scrolling="no" width="'+w+'" height="'+h+'"></iframe>'; document.getElementById('ifm_'+div_id).src = resUrl; }else if(type=='.js'){ //js document.write('<script language="javascript" type="text/javascript" src="'+resUrl+'"></scr'+'ipt>'); }else{ //textlink od.innerHTML =resUrl; }}else{ if(type=='.swf'){ document.write(getFlashString(resUrl,linkUrl)); }else if(type=='.jpg' || type=='.gif'){ document.write('<a href="'+linkUrl+'" target="_blank"><img src="'+resUrl+'" border="0" width="'+w+'" height="'+h+'" /></a>'); }else if(type=='.html' || type=='.tml'|| type=='.html'){ document.write('<iframe id="ifm_'+div_id+'" frameborder="0" scrolling="no" width="'+w+'" height="'+h+'"></iframe>'); document.getElementById('ifm_'+div_id).src = resUrl; }else if(type=='.js'){ //js document.write('<script language="javascript" type="text/javascript" src="'+resUrl+'"></scr'+'ipt>'); }else{ //textlink document.write(resUrl); }}function getFlashString(resUrl,linkUrl){ var dcswf_click = escape(linkUrl); var s=''; s += "<OBJECT classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'"; s += " codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0'"; s += " ID=flashad WIDTH=" + w + " HEIGHT=" + h + ">"; s += " <PARAM NAME=movie VALUE='" + resUrl + "?clickTag=" + dcswf_click + "'> "; s += " <PARAM NAME=quality VALUE=autohigh> "; s += " <PARAM NAME=wmode VALUE=opaque> "; s += " <EMBED SRC='" + resUrl + "?clickTag=" + dcswf_click + "' QUALITY=autohigh "; s += " NAME=flashad swLiveConnect=TRUE WIDTH=" + w + " HEIGHT=" + h + " wmode=opaque "; s += " TYPE='application/x-shockwave-flash' PLUGINSPAGE='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash'>"; s += "</EMBED>"; s += "</OBJECT>"; return s;} function BubbleSort(arr) { //交换排序->冒泡排序 var temp; var exchange; for(var i=0; i<arr.length; i++) { exchange = false; for(var j=arr.length-2; j>=i; j--) { if((arr[j+1][2]) < (arr[j][2])) { temp = arr[j+1]; arr[j+1] = arr[j]; arr[j] = temp; exchange = true; } } if(!exchange) break; } return arr; }function strToDate(str,ext){ var aryDate = new Array(); var aryTime = new Array(); var dt = new Array(); dt = str.split(' '); aryDate = dt[0].split('-'); if(dt.length>=2) { aryTime = dt[1].split(':'); } var newDate = new Date(aryDate[0],aryDate[1]-1,aryDate[2],aryTime[3]?aryTime[3]:0,aryTime[4]?aryTime[4]:0,aryTime[5]?aryTime[5]:0); if(ext){ newDate = new Date(newDate.getTime()+1000*60*60*24);//加一天 } return newDate;}//根据权重随机抽取要显示的广告索引号,权重越大抽取到的概率越大function GetAdIndexByRandomAndWeight(adArr){ //计算权值总数 var w =0; for(var i=0; i<adArr.length; i++){ w+=parseInt(adArr[i][2]); } rd =Math.random()*w; var tmp=0; for(var i=0; i<adArr.length; i++){ tmp += parseInt(adArr[i][2]); if(rd <= tmp) //adArr经过升序排序 { return i; } } return 0; }}}好像是这里面有内容,像是用的frame 弹出窗口被Chrome屏蔽了,看到2个页面了,应该是javascript控制的 看了,应该就是一个windows.open啊,最多复杂一点,归要结底,就是一个windows.open <asp:Panel ID="Panel1" runat="server" Style="display: none"> <table>.....</table><panel><ajaxToolkit:ModalPopupExtender ID="ModalPopupExtender1" runat="server" TargetControlID="hfProjectID" PopupControlID="Panel1" BackgroundCssClass="modalBackground" OkControlID="btnClose1" DropShadow="false" PopupDragHandleControlID="Panel1" CancelControlID="btnClose1" />用ajaxControlToolKit可以实现 我用FileUpload 实现上传功能 保存在数据库Image字段里面 总是报错文件大错误求高手帮忙 请教各位老师有关按钮回退的问题 搜索 空格 查询 图片下载问题 submit问题,为啥不起作用 谁做过工商银行的网上支付? oracle怎么让列表隐藏起来?如图 asp.net中session的设置 招聘:.Net程序员 又一datagrid邦定连接问题 大侠..救命啊--JavaScript总是获取不到Object的Id asp.net 类问题!
欢迎光临 我的博客 http://www.zlblogs.com
window.open();
<a href='informationAudit.aspx' target=\"show\">信息审核管理</a>
他用了Flash··这点我很肯定···具体点就不知道了。
<head runat="server">
<title></title> <script src="js/jquery.js" type="text/javascript"></script> <script type="text/javascript">
function openWeb() {
window.open('http://www.baidu.com', '_blank', 'height=500, width=700');
}
</script></head>
<body onload="openWeb()">
<form id="form1" runat="server">
</form>
</body>
http://y1.ifengimg.com/index/ifengRotatorAd.js/*
RotatorAD
Author: [email protected]
格式: new RotatorAD(商业广告数组, 垫底广告数组, 层id);商业广告数组[资源url,弹出链接url,排期开始时间,排期结束时间,轮播权值]
说明: 每次访问根据权值随机出现;自动过滤过期广告;无商业广告时,轮播垫底广告
*/
if(typeof(RotatorAD)!='function'){
var RotatorAD = function(rad,ifengAd,div_id){var date = new Date();var w = rad.width;//广告的宽度
var h = rad.height;//广告高度var curIndex=0;var ary = new Array();
//过滤过期广告
for(var i=0; i<rad.length; i++){
var strStart = rad[i][2].replace('<startdate>','').replace('</startdate>','');
var strEnd = rad[i][3].replace('<enddate>','').replace('</enddate>','');
var start = strToDate(strStart);
var end = strToDate(strEnd);
if((date>start || strStart=="" ) && (date<end || strEnd=="" ) ){
ary.push([rad[i][0], rad[i][1], rad[i][4]?rad[i][4]:1]);//([资源url,弹出链接url,轮播权值:默认为1)]
}
}//补垫底广告
if(ary.length==0)
{
for(var i=0; i<ifengAd.length; i++){
ary.push([ifengAd[i][0], ifengAd[i][1],1]);
}
}//根据权重计算得到广告索引号
//ary.sort(function(x,y){return x[2]<y[2];});//根据权重升序排序 IE FF 两者对此方法的排序算法不一致,弃用!//冒泡排序
ary = BubbleSort(ary);curIndex = GetAdIndexByRandomAndWeight(ary);//根据权重随机抽取要显示的广告索引号,权重越大抽取到的概率越大//显示 AD
var type = ary[curIndex][0].substring(ary[curIndex][0].lastIndexOf (".")).toLowerCase();var resUrl = ary[curIndex][0];
var linkUrl = ary[curIndex][1];var od = document.getElementById(div_id);
if(od){
if(type=='.swf'){
od.innerHTML = getFlashString(resUrl,linkUrl);
}else if(type=='.jpg' || type=='.gif'){
od.innerHTML = '<a href="'+linkUrl+'" target="_blank"><img src="'+resUrl+'" border="0" width="'+w+'" height="'+h+'" /></a>';
}else if(type=='.html' || type=='.tml'|| type=='.html'){
od.innerHTML = '<iframe id="ifm_'+div_id+'" frameborder="0" scrolling="no" width="'+w+'" height="'+h+'"></iframe>';
document.getElementById('ifm_'+div_id).src = resUrl;
}else if(type=='.js'){ //js
document.write('<script language="javascript" type="text/javascript" src="'+resUrl+'"></scr'+'ipt>');
}else{ //textlink
od.innerHTML =resUrl;
}
}
else
{
if(type=='.swf'){
document.write(getFlashString(resUrl,linkUrl));
}else if(type=='.jpg' || type=='.gif'){
document.write('<a href="'+linkUrl+'" target="_blank"><img src="'+resUrl+'" border="0" width="'+w+'" height="'+h+'" /></a>');
}else if(type=='.html' || type=='.tml'|| type=='.html'){
document.write('<iframe id="ifm_'+div_id+'" frameborder="0" scrolling="no" width="'+w+'" height="'+h+'"></iframe>');
document.getElementById('ifm_'+div_id).src = resUrl;
}else if(type=='.js'){ //js
document.write('<script language="javascript" type="text/javascript" src="'+resUrl+'"></scr'+'ipt>');
}else{ //textlink
document.write(resUrl);
}}function getFlashString(resUrl,linkUrl)
{
var dcswf_click = escape(linkUrl);
var s='';
s += "<OBJECT classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'";
s += " codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0'";
s += " ID=flashad WIDTH=" + w + " HEIGHT=" + h + ">";
s += " <PARAM NAME=movie VALUE='" + resUrl + "?clickTag=" + dcswf_click + "'> ";
s += " <PARAM NAME=quality VALUE=autohigh> ";
s += " <PARAM NAME=wmode VALUE=opaque> ";
s += " <EMBED SRC='" + resUrl + "?clickTag=" + dcswf_click + "' QUALITY=autohigh ";
s += " NAME=flashad swLiveConnect=TRUE WIDTH=" + w + " HEIGHT=" + h + " wmode=opaque ";
s += " TYPE='application/x-shockwave-flash' PLUGINSPAGE='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash'>";
s += "</EMBED>";
s += "</OBJECT>";
return s;} function BubbleSort(arr) { //交换排序->冒泡排序
var temp;
var exchange;
for(var i=0; i<arr.length; i++) {
exchange = false;
for(var j=arr.length-2; j>=i; j--) {
if((arr[j+1][2]) < (arr[j][2])) {
temp = arr[j+1];
arr[j+1] = arr[j];
arr[j] = temp;
exchange = true;
}
}
if(!exchange) break;
}
return arr;
}function strToDate(str,ext){
var aryDate = new Array();
var aryTime = new Array();
var dt = new Array();
dt = str.split(' ');
aryDate = dt[0].split('-');
if(dt.length>=2)
{
aryTime = dt[1].split(':');
}
var newDate = new Date(aryDate[0],aryDate[1]-1,aryDate[2],aryTime[3]?aryTime[3]:0,aryTime[4]?aryTime[4]:0,aryTime[5]?aryTime[5]:0);
if(ext){
newDate = new Date(newDate.getTime()+1000*60*60*24);//加一天
}
return newDate;
}//根据权重随机抽取要显示的广告索引号,权重越大抽取到的概率越大
function GetAdIndexByRandomAndWeight(adArr)
{
//计算权值总数
var w =0;
for(var i=0; i<adArr.length; i++){
w+=parseInt(adArr[i][2]);
} rd =Math.random()*w;
var tmp=0;
for(var i=0; i<adArr.length; i++){
tmp += parseInt(adArr[i][2]);
if(rd <= tmp) //adArr经过升序排序
{
return i;
}
}
return 0;
}}
}
好像是这里面有内容,像是用的frame
<table>.....</table>
<panel>
<ajaxToolkit:ModalPopupExtender ID="ModalPopupExtender1" runat="server" TargetControlID="hfProjectID"
PopupControlID="Panel1" BackgroundCssClass="modalBackground" OkControlID="btnClose1"
DropShadow="false" PopupDragHandleControlID="Panel1" CancelControlID="btnClose1" />
用ajaxControlToolKit可以实现