【asp.net弹出层 】 层里显示一个页面内容 在点击 超链接 <a>标签的时候 弹出一个层 这个层里面显示 a.aspx页面 请教大家 怎么做 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 那可以在层里面调用a.aspx页面 iframe嵌套a页面,弹出div这个层<div><iframe src="a.aspx" frameborder="0"/></div>http://www.open-open.com/ajax/Window.htm <div id="mask" style="border:1px solid red;width:100px;height:100px;position:absolute;z-index:2;top:100px;left:100px;"> <iframe src="aaa.htm" frameborder="0" scrolling="no" width="100" height="100"></iframe></div>然后你在控制这个层的显示隐藏,以及位置要放哪里。 http://www.open-open.com/ajax/Window.htm这里有很多,自己挑种。 超漂亮的弹出层效果,引用Dialog.js即可使用,兼容主流浏览器,支持ie6下的阴影和半透明效果引用Dialog.js即可使用,兼容主流浏览器,支持ie6下的阴影和半透明效果 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title>超漂亮的仿腾讯弹出层效果www.corange.cn</title> <style> body {background: #ffffff; color: #444;} a{ color: #09d; text-decoration: none; border: 0; background-color: transparent;} body,div,q,iframe,form,h5{ margin: 0; padding: 0;} img,fieldset { border: none 0; } body,td,textarea { word-break: break-all; word-wrap: break-word; line-height:1.5;} body,input,textarea,select,button { margin: 0; font-size: 12px; font-family: Tahoma, SimSun, sans-serif;} div,p,table,th,td { font-size:1em; font-family:inherit; line-height:inherit;} h5{ font-size:12px;} </style> <script type="text/javascript" src="Dialog.js"></script> <script type="text/javascript"> function $(ele) { if (typeof(ele) == 'string'){ ele = document.getElementById(ele) if(!ele){ return null; } } if(ele){ Core.attachMethod(ele); } return ele; } var Core = {}; Core.attachMethod = function(ele){ if(!ele||ele["$A"]){ return; } if(ele.nodeType==9){ return; } var win; try{ if(isGecko){ win = ele.ownerDocument.defaultView; }else{ win = ele.ownerDocument.parentWindow; } for(var prop in $E){ ele[prop] = win.$E[prop]; } }catch(ex){ //alert("Core.attachMethod:"+ele)//有些对象不能附加属性,如flash } } function zOpenD(){ var diag = new Dialog("Diag1"); diag.Width = 900; diag.Height = 400; diag.Title = "弹出窗口示例"; diag.URL = "http://corange.cn/"; diag.ShowMessageRow = true; diag.MessageTitle = "弹出窗口示例"; diag.Message = "在这儿你可以对这个窗口的内容或功能作一些说明"; diag.OKEvent = zAlert;//点击确定后调用的方法 diag.show(); } function zOpen(){ var diag = new Dialog("Diag2"); diag.Width = 900; diag.Height = 400; diag.Title = "弹出窗口示例"; diag.URL = "http://corange.cn/"; diag.OKEvent = zAlert;//点击确定后调用的方法 diag.show(); } function zAlert(){ Dialog.alert("弹出的文字"); } function zConfirm(){ Dialog.confirm('警告:您确认要吗?',function(){Dialog.alert("正是好时候");}); } function sometext(ele,n){ var strArr=["c","o","r","a","n","g","e",".","c","n"]; var writeStr="" for(i=0;i<n;i++){ index=parseInt(Math.random()*5); for(j=0;j<10;j++){ str=index+j>9?index+j-10:index+j; writeStr+=strArr[str]; } } $(ele).innerHTML=writeStr; } </script> </head> <body> <div id="div1"></div> <p> <input type="button" value="弹出新窗口" onclick="zOpen()" /> <input type="button" value="弹出带说明的新窗口" onclick="zOpenD()" /> <input type="button" value="弹出信息提示对话框" onclick="zAlert()" /> <input type="button" value="弹出选择对话框" onclick="zConfirm()" /></p> <div id="div2"></div> <script>sometext("div1",100);sometext("div2",300);</script> </body> </html> 图片文件和js文件 http://www.corange.cn//uploadfiles/dialog_16036.zip 最简单的 window.open()<a href="#" onclick="window.open('HTMLPage.htm')">test</a> 用WebConfigurationManager设置appSettings连接字符串无反应 双击一个图片,播放音乐 DataView里面按字段的字符长度排序的问题,在线等~ 服务器端控件的问题! 求Forms基于角色授权验证的例子代码 if (recu.Read()) 未将对象引用设置到对象的实例。 关于身份验证 提问一个很简单的问题(有关图片改变的问题) 用户控件中的TreeView的问题 EF中重复操作同一个表的同一条数据时出错。 gridview获取列问题 在母版页下获取不到Session值?
<div>
<iframe src="a.aspx" frameborder="0"/>
</div>
http://www.open-open.com/ajax/Window.htm
<div id="mask" style="border:1px solid red;width:100px;height:100px;position:absolute;z-index:2;top:100px;left:100px;">
<iframe src="aaa.htm" frameborder="0" scrolling="no" width="100" height="100"></iframe>
</div>
然后你在控制这个层的显示隐藏,以及位置要放哪里。
引用Dialog.js即可使用,兼容主流浏览器,支持ie6下的阴影和半透明效果 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>超漂亮的仿腾讯弹出层效果www.corange.cn</title>
<style>
body {background: #ffffff; color: #444;}
a{ color: #09d; text-decoration: none; border: 0; background-color: transparent;}
body,div,q,iframe,form,h5{ margin: 0; padding: 0;}
img,fieldset { border: none 0; }
body,td,textarea { word-break: break-all; word-wrap: break-word; line-height:1.5;}
body,input,textarea,select,button { margin: 0; font-size: 12px; font-family: Tahoma, SimSun, sans-serif;}
div,p,table,th,td { font-size:1em; font-family:inherit; line-height:inherit;}
h5{ font-size:12px;}
</style>
<script type="text/javascript" src="Dialog.js"></script>
<script type="text/javascript">
function $(ele) {
if (typeof(ele) == 'string'){
ele = document.getElementById(ele)
if(!ele){
return null;
}
}
if(ele){
Core.attachMethod(ele);
}
return ele;
}
var Core = {};
Core.attachMethod = function(ele){
if(!ele||ele["$A"]){
return;
}
if(ele.nodeType==9){
return;
}
var win;
try{
if(isGecko){
win = ele.ownerDocument.defaultView;
}else{
win = ele.ownerDocument.parentWindow;
}
for(var prop in $E){
ele[prop] = win.$E[prop];
}
}catch(ex){
//alert("Core.attachMethod:"+ele)//有些对象不能附加属性,如flash
}
}
function zOpenD(){
var diag = new Dialog("Diag1");
diag.Width = 900;
diag.Height = 400;
diag.Title = "弹出窗口示例";
diag.URL = "http://corange.cn/";
diag.ShowMessageRow = true;
diag.MessageTitle = "弹出窗口示例";
diag.Message = "在这儿你可以对这个窗口的内容或功能作一些说明";
diag.OKEvent = zAlert;//点击确定后调用的方法
diag.show();
}
function zOpen(){
var diag = new Dialog("Diag2");
diag.Width = 900;
diag.Height = 400;
diag.Title = "弹出窗口示例";
diag.URL = "http://corange.cn/";
diag.OKEvent = zAlert;//点击确定后调用的方法
diag.show();
}
function zAlert(){
Dialog.alert("弹出的文字");
}
function zConfirm(){
Dialog.confirm('警告:您确认要吗?',function(){Dialog.alert("正是好时候");});
}
function sometext(ele,n){
var strArr=["c","o","r","a","n","g","e",".","c","n"];
var writeStr=""
for(i=0;i<n;i++){
index=parseInt(Math.random()*5);
for(j=0;j<10;j++){
str=index+j>9?index+j-10:index+j;
writeStr+=strArr[str];
}
}
$(ele).innerHTML=writeStr;
}
</script>
</head>
<body>
<div id="div1"></div>
<p> <input type="button" value="弹出新窗口" onclick="zOpen()" /> <input type="button" value="弹出带说明的新窗口" onclick="zOpenD()" /> <input type="button" value="弹出信息提示对话框" onclick="zAlert()" /> <input type="button" value="弹出选择对话框" onclick="zConfirm()" /></p>
<div id="div2"></div>
<script>sometext("div1",100);sometext("div2",300);</script>
</body>
</html>
图片文件和js文件
http://www.corange.cn//uploadfiles/dialog_16036.zip