我想通过此链接><a href="UserInformation.jsp">点点点</a>
在此点击此链接的时候,弹出一个单独窗体,或者一个小的单独的浏览器怎么写?
各位大侠指点。
在此点击此链接的时候,弹出一个单独窗体,或者一个小的单独的浏览器怎么写?
各位大侠指点。
解决方案 »
- SSH2中,请教action的写法
- session过期
- 严重: Exception starting filter springSecurityFilterChain 的问题
- 求助Servlet的问题
- IMQ&Glassfish:Broker unavailable or timeout user=guest
- Hibernate多对多映射在删除时性能问题
- Jbuilder 9 中编译struts 的问题?
- webservice在服务端能接收客户端的消息并作出反映吗
- 初学者问些概念方面的问题。
- 请教怎样通过一个字符窜ID来定位bean,再调用EJBHome.remove()的方法来删除??
- 模糊查询(sql)
- 在weblogic中如何配置数据库?急!
<SCRIPT LANGUAGE="javascript">
<!--
window.open ('page.html', 'newwindow', 'height=100, width=400, top=0, left=0, toolbar=no,
menubar=no, scrollbars=no, resizable=no,location=n o, status=no') //这句要写成一行
-->
</SCRIPT>
参数解释:
<SCRIPT LANGUAGE="javascript"> js脚本开始;
window.open 弹出新窗口的命令;
'page.html' 弹出窗口的文件名;
'newwindow' 弹出窗口的名字(不是文件名),非必须,可用空''代替;
height=100 窗口高度;
width=400 窗口宽度;
top=0 窗口距离屏幕上方的象素值;
left=0 窗口距离屏幕左侧的象素值;
toolbar=no 是否显示工具栏,yes为显示;
menubar,scrollbars 表示菜单栏和滚动栏。
resizable=no 是否允许改变窗口大小,yes为允许;
location=no 是否显示地址栏,yes为允许;
status=no 是否显示状态栏内的信息(通常是文件已经打开),yes为允许;
</SCRIPT> js脚本结束
<a href="#" onclick="window.open(xxx)">xxx</a>
用window.open打开太难看了。。
给你个例子<html>
<head>
<script>
function reSizeWindow()
{
var shadow = document.getElementById("shadow");
var dialog = document.getElementById("dialog");
shadow.style.width = parseInt(document.body.clientWidth) + parseInt(document.body.scrollLeft);
shadow.style.height = parseInt(document.body.clientHeight) + parseInt(document.body.scrollTop);
dialog.style.left = parseInt(document.body.clientWidth)/2 - parseInt(dialog.style.width)/2 + parseInt(document.body.scrollLeft);
dialog.style.top = parseInt(document.body.clientHeight)/2 - parseInt(dialog.style.height)/2 + parseInt(document.body.scrollTop);
}
function openWindow()
{
document.getElementById("shadow").style.display = "block";
document.getElementById("dialog").style.display = "block";
reSizeWindow();
}
function closeWindow()
{
document.getElementById("shadow").style.display = "none";
document.getElementById("dialog").style.display = "none";
}
</script>
<style type="text/css">
.dialogStyle
{
background:red;
position:absolute;
display:none;
text-align:right;
z-index:2;
}
.shadowStyle
{
position:absolute;
left:0px;
top:0px;
display:none;
filter:alpha(opacity=30);
opacity:0.3;
background:gray;
z-index:1;
}
</style>
</head>
<body style="margin:0px 0px 0px 0px;">
<input type="button" onclick="openWindow()" value="open" style="margin-left:100px;margin-top:100px;"/>
<div id="dialog" class="dialogStyle" style="width:200px;height:200px;">
<input type="button" value="close" onclick="closeWindow()"/>
</div>
<div id="shadow" class="shadowStyle">
</div>
<!--width:200px;height:200px;background:red;position:absolute;display:none;text-align:right;z-index:2;-->
<!--position:absolute;left:0px;top:0px;display:none;filter:alpha(opacity=30);opacity:0.3;background:gray;z-index:1;-->
<script>
window.onresize = function()
{
reSizeWindow();
}
window.onscroll = function()
{
reSizeWindow();
}
for(var i = 0;i < 100;i++)
{
document.write("<br/>"+i);
}
</script>
</body>
</html>