QuickBox在页面加载时打开 [英] QuickBox to open on page load

查看:71
本文介绍了QuickBox在页面加载时打开的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好!这个Quickbox是用我不熟悉的CSS编写的.我想让它在页面加载时打开...现在,Manfred给了我另一个帮助,所以我复制了这个想法,只是将onclick更改为onload甚至onpageload,但无济于事.请告诉我如何在页面加载时打开此快捷框,谢谢

Hi there! this Quickbox was written in mostly css which i am not familiar with. I want to make it open on page load,.. now Manfred gave me great help with the other one so i copied the idea by just changing onclick to onload even onpageload instead, but to no avail. Please tell me how to open this quickbox on pageload, thank you

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head> <style>
        .black_overlay{
            display: none;
            position: absolute;
            top: 0%;
            left: 0%;
            width: 100%;
            height: 100%;
            background-color: black;
            z-index:1001;
            -moz-opacity: 0.8;
            opacity:.80;
            filter: alpha(opacity=80);
        }
        .white_content {
            display: none;
            position: absolute;
            top: 25%;
            left: 25%;
            width: 50%;
            height: 50%;
            padding: 1px;
            border: 1px solid orange;
            background-color: white;
            z-index:1002;
            overflow: auto;
        }
    </style> </head><body><p>!<a href="javascript:void(0)" onclick="document.getElementById('light').style.display='block';document.getElementById('fade').style.display='block'">here</a></p><div id="light" class="white_content">! <a href="javascript:void(0)" onclick="document.getElementById('light').style.display='none';document.getElementById('fade').style.display='none'">X</a></div><div id="fade" class="black_overlay"></div></body></html><script language="javascript">
</script>

推荐答案

使用上面的代码创建页面(例如quickbox.aspx),然后使用html onload方法调用javascript打开页面(quixkbox). aspx)

make a page out of the above code(say quickbox.aspx) and then make use html onload method call the javascript to open the page(quixkbox.aspx)

<script language="JavaScript">

function display()
{
        var URL =  "./quickbox.aspx";
        var Name = "popup";
var Fensteroptionen = "toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0";
var Breite = 800;
var Hoehe = 600;
window.open(URL, 'Name', Fensteroptionen + ',width=' + Breite + ',height=' + Hoehe);
}
//-->
</script>
</head>
<body onload=display();>


通过删除此
</div><div id="fade" class="black_overlay">


这篇关于QuickBox在页面加载时打开的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆