高手请进,问题解决,马上给分 给你一个思路:这是模式对话框var arr = showModalDialog("11.htm", "", "dialogWidth:18.5em; dialogHeight:17.5em; status:0"); 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 你测试一下,当然漂亮的美工活儿就不写了.有问题可以继续讨论.<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><title>测试模拟弹出模态对话框</title><script language="JavaScript">document.oncontextmenu = document_ContextMenufunction document_ContextMenu(){ return false}function w_open(){ document.all.Layer1.style.display="" document.all.Layer1.setCapture(false)}function c_open(){ document.all.Layer1.style.display="none" document.all.Layer1.releaseCapture(true)}</script></head><body><div id="Layer1" style="position:absolute; left:283px; top:96px; width:140px; height:76px; z-index:1; background-color: #CCCCCC; layer-background-color: #CCCCCC; border: 1px none #000000; display:none"> <div align="center"><br> <br> <font size="2">这是模态框 <input type="button" name="Submit2" value="取消模态框" onclick="c_open()"> </font></div></div><input type="button" name="Submit" value="弹出模态框" onclick="w_open()"></body></html> <script language="JavaScript">var popWin = null; var winCount = 0; var winName = "popWin"; function SetupPopWin(winURL,winWidth, winHeight, moveX, moveY, winFeatures) { winName = "popWin" + winCount++; //解决弹出窗口冲突问题 var d = new Date(); winName = d.getYear().toString(10); winName += "_" + d.getMonth().toString(10); winName += "_" + d.getDay().toString(10); winName += "_" + d.getHours().toString(10); winName += "_" + d.getMinutes().toString(10); winName += "_" + d.getSeconds().toString(10); CloseSetupWin(); if (SetupPopWin.arguments.length == 6) winFeatures = "," + winFeatures; else winFeatures = ""; x = (screen.width-winWidth)/2; if(moveX != "") x = moveX; y = (screen.height-winHeight)/2; if(moveX != "") y = moveY; popWin = window.open(winURL, winName , "top=" + y + ",left=" + x + ",width=" + winWidth + ",height=" + winHeight + winFeatures + ",resizable=yes"); }</script> 谁给我说说------document.all是什么啊 可以用一个函数,当校验不合法时,调用这个函数,并传递这些参数,在这个函数中,如果后两个参数(即高度和宽宽如果是空的话,给上默认值,判断一下就可以了),然后调用showModalDialog()函数! wcqgm(傲翔白鸽) ,您说的好象很简单似的,那希望您能把详尽的代码写给我,谢谢,一定会给您分数的 jquery $(this)与this的问题 求改一小段代码,实现扩大图片 使用document.location进行跳转后,会出现页面混乱的情况。 ext2 分页的时候为什么读不到数据 这些数组的结果为什么是这样的? [没分了啊]JAVASCRIPT有没有这个功能,使匹配文字是选中状态???????? 内存变量的问题 百度实时JS开发框架Clouda,让你5分钟开发一个APP 我這樣用怎麼會出錯???請大家看看!(點 add 出錯) 如何把列表框用样式表控制,显示为平面,去掉边框的阴影。 怎么样获得屏幕的分辨率?在线等 meizz(梅花雪) ,刚才结贴好像分没给你加上,到这里来取分
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>测试模拟弹出模态对话框</title>
<script language="JavaScript">
document.oncontextmenu = document_ContextMenu
function document_ContextMenu()
{
return false
}
function w_open()
{
document.all.Layer1.style.display=""
document.all.Layer1.setCapture(false)
}
function c_open()
{
document.all.Layer1.style.display="none"
document.all.Layer1.releaseCapture(true)
}
</script>
</head><body><div id="Layer1" style="position:absolute; left:283px; top:96px; width:140px; height:76px; z-index:1; background-color: #CCCCCC; layer-background-color: #CCCCCC; border: 1px none #000000; display:none">
<div align="center"><br>
<br>
<font size="2">这是模态框
<input type="button" name="Submit2" value="取消模态框" onclick="c_open()">
</font></div>
</div>
<input type="button" name="Submit" value="弹出模态框" onclick="w_open()">
</body>
</html>
var popWin = null;
var winCount = 0;
var winName = "popWin";
function SetupPopWin(winURL,winWidth, winHeight, moveX, moveY, winFeatures)
{
winName = "popWin" + winCount++;
//解决弹出窗口冲突问题
var d = new Date();
winName = d.getYear().toString(10);
winName += "_" + d.getMonth().toString(10);
winName += "_" + d.getDay().toString(10);
winName += "_" + d.getHours().toString(10);
winName += "_" + d.getMinutes().toString(10);
winName += "_" + d.getSeconds().toString(10);
CloseSetupWin();
if (SetupPopWin.arguments.length == 6)
winFeatures = "," + winFeatures;
else
winFeatures = "";
x = (screen.width-winWidth)/2;
if(moveX != "")
x = moveX;
y = (screen.height-winHeight)/2;
if(moveX != "")
y = moveY;
popWin = window.open(winURL, winName , "top=" + y + ",left=" + x + ",width=" + winWidth + ",height=" + winHeight + winFeatures + ",resizable=yes");
}</script>
在这个函数中,如果后两个参数(即高度和宽宽如果是空的话,给上默认值,判断一下就可以了),然后调用showModalDialog()函数!