当我打开网站时,我想显示弹出窗口

问题描述:

当我打开网站时,我想在加载时显示弹出窗口.就像此cout.com/">http://wyscout.com/[ ^ ]

when i open a website,i want to display popup window while loading.Like this cout.com/">http://wyscout.com/[^]

我认为这应该可行.

在页面上放置一个"div"作为隐藏的显示.
类似于:
I guess this should work.

Place a ''div'' in your page as display hidden.
Something like:
<div id="divMain" style="position: absolute; display: None; z-index: 1001;"></div>



现在,在页面上的script标签中,只需将其显示为该div的显示即可:



Now, on page, in script tag, just make the display as display for this div:

document.getElementById("divMain").style.display = "block";
// set other properties of div like position
// once some event happens, hide it again.



需要注意两点,在页面加载完成时将其显示出来.您可以使用绝对位置将zIndex保持高于正常页面.

尝试!



Two things to notice, you show it as the page load is complete. You keep the zIndex higher than normal page with position absolute.

Try!


您能到目前为止将代码放置在这里吗,我认为您可以使用css文件进行处理,并在页面加载事件完成后调用它
can you place your code here so far what you did and i think you can do it with css file and call it when the page load event completes