自己做一个div,以iframe等作为载体
解决方案 »
- 20多行js代码写一个最简单的3x3拼图游戏,兼容各浏览器,排除无解情况
- javaScript中怎么使用正则表达式来验证
- js传对象怎么改?急!!
- 如何用javascript实现运行的网页是全屏的效果
- 路过此地上WC的高手请进..<<JS小程序在IE和FIREFOX中的兼容问题>>..相信您解决了此问题上WC也来得急!
- 很有难度的问题,请众高手帮一下忙.
- 关于asp中使用框架的问题:为什么我在.asp中加入frameset框架,只要一运行就出现:下载的弹出对话框,而把.asp全换成.html就可以了
- 哪位高人能进一步把小窗口单独弄出来?
- 我是新手,有一个问题想请教一下.
- 天天都提问
- 请问如何实现论坛里发帖时候 帖图和加粗字体改变字体颜色等等功能 我没有分了。。。。
- [求助]+++++Microsoft JScript 运行时错误 (0x800A01B6)+++++
MessageBox类,
有两个方法
Show(aA,Caption,Icon,dH)//aA是提示内容,Caption是标题,Icon是图标,dH是按钮
Close()//关闭
<a href="http://www.csdn.com" onclick="return MessageBox.Show('确定要删除吗','系统提示',ICON_QUESTION,MB_YESNO)"></a>
<a href="http://www.csdn.com" onclick="return confirm('确定要删除吗')"></a>我想要的是这两个效果相同,点击超级链接的时候跳出对话框,点确定前往链接地址
----------------------------------------------------
我blog里留言的人 luhang 是你么?你可能是JS刚入门吧,我的确不想伤你,也不想说你了...
看我在我blog里的回复....汗....你到底懂不懂handler在这里面是什么? 那你看看这样?上面的handler改成function handler(){window.location.href="http://www.csdn.net";}<a href="javascript:neverDialog(event,'Are You Sure To Excute it?','handler()')">csdn</a>
vArguments:传入参数.可以是数组
sFeatures:窗口样式其中,用showModalDialog产生了窗口后,焦点无法移回主窗口.
用产生了窗口后,焦点可以移回主窗口,可是弹出的对话框却一直保持在主窗口之上.在showModalDialog的页面中,使用returnValue来返回任何值。
碰到这种情况,只能通过callBack来完成.
-----------------------------------我也不想说太多了,你上面说的功能我都已经基本实现了。如果你非要争,我也不想说什么,你一定要别人帮你实现你心里想的东西,我想谁都不会有那个时间。
也许是我理解错,我也不想争了,你都还不明白modalDialog的意思。我没有硬要拿我做的东西硬加在你的这个标题上,而且我也没有拿我的东西加在你的标题上,你直接就是一根本就不管用。我还在这里跟贴是要说明,我没有理由来帮你,但是你却觉得我欠你什么似的,在我的blog里还要说根本就不管用,请问我就是一定帮你写的这个code,我写的代码有没有用自在人心。
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title> - http://www.never-online.net </title>
<meta http-equiv="ImageToolbar" content="no" />
<meta name="author" content="BlueDestiny, never-online"/>
<meta name="keywords" content="never modules, Mozilla CSS, C#, .net, Refercence, BlueDestiny, never-online, www.never-online.net"/>
<meta name="description" content="BlueDestiny, never-online"/>
<meta name="title" content="Mozilla CSS Refercence And Demo - http://www.never-online.net" />
<meta name="creator.name" content="Genius Lau, never-online, blueDestiny" />
<style type="text/css" media="all" title="Default">
body { background-color:appworkspace; }
.button { font-size:9pt; font-family:verdana; border-left:4px solid #444; border-top:1px solid #444; border-bottom:1px solid #444; border-right:1px solid #444; }
</style>
<script type="text/javascript">
//<![CDATA[
function neverDialog(e, msg, handler) {
// Script by BlueDestiny, never-online
// Simple simulate modal dialog
// welcome to http://blog.never-online.net
// http://blog.csdn.net/BlueDestiny/
// and keep these copyright
window._x = null;
if (e) e.srcElement ? e.srcElement.blur() : e.target.blur();
if (_x) window.clearTimeout(_x);
var $=document.getElementById;
var d = $("dialog");
var a = $("demo");
var Htmls = "";
var cnt = 20;
Htmls += "<html>\n"
+ "<head>\n"
+ "<style text=\"text/css\">\n"
+ "body { margin:40px; background-color:#eeeeee; }\n"
+ "* { font-size:9pt; font-family:verdana; }\n"
+ ".bold { font-weight:bold; }\n"
+ ".button { width:100px; border-left:4px solid #444; border-top:1px solid #444; border-bottom:1px solid #444; border-right:1px solid #444; }\n"
+ "</style>\n"
+ "</head>\n"
+ "<body>\n"
+ "<p align='center'>never dialog demo, just a test, http://blog.never-online.net</p>\n"
+ "<p align='center' class='bold'>" +msg+ "</p>\n"
+ "<p align='center'>\n"
+ "<input class='button' type='button' value=' - O K - ' onclick='top.window.document.getElementById(\"demo\").style.display=\"none\";top.window.document.body.style.overflow=\"\"" +(handler?";top.window."+handler+"":"")+ "\'/>\n"
+ "<input type='button' class='button' value=' - N O -' onclick='top.window.document.getElementById(\"demo\").style.display=\"none\";top.window.document.body.style.overflow=\"\"'/>"
+ "</p>\n"
+ "</body>\n"
+ "</html>"
d.contentWindow.document.open("text/html");
d.contentWindow.document.write(Htmls);
d.contentWindow.document.close();
with(a.style) {
display = "block";
left="0px";
top="0px";
width=document.body.clientWidth;
height=document.body.clientHeight;
}
function f_alpha() {
if (cnt>=80) {
window.clearTimeout(_x);
return;
}
// if ie
a.style.filter="alpha(opacity=" +(cnt++)+")";
// mozilla
_x = window.setTimeout(f_alpha, 1);
}
f_alpha();
document.body.style.overflow = "hidden";
}
function handler() {
window.location.href="http://blog.never-online.net/"
}
//]]>
</script>
</head>
<body id="www.never-online.net" margin="0">
<input type="button" value="Excute it" onclick="neverDialog(event,'Are You Sure To Excute it?','handler()')" class="button"/>
<div height="100%" width="100%" style="display:none;position:absolute;-moz-opacity:0.6" id="demo">
<iframe id="dialog" height="100%" width="100%" frameborder="0" marginheight="0" marginwidth="0" style="font-size:9pt; font-family:verdana;">
</iframe>
</div>
</body>
</html>