gpt4 book ai didi

javascript - 需要在页面后面打开弹出窗口

转载 作者:行者123 更新时间:2023-11-28 02:37:17 24 4
gpt4 key购买 nike

这是我的代码

<script language="JavaScript1.1">
var popunder
function get_cookie(Name) {
var search = Name + "="
var returnvalue = "";
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) { // if cookie exists
offset += search.length
// set index of beginning of value
end = document.cookie.indexOf(";", offset);
// set index of end of cookie value
if (end == -1)
end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(offset, end))
}
}
return returnvalue;
}
popfrequency="0 minutes"
function resetcookie(){
var expireDate = new Date()
expireDate.setMinutes(expireDate.getMinutes()-0)
document.cookie = "popunder=;path=/;expires=" + expireDate.toGMTString()
}
function loadornot(){
if (get_cookie('popunder')==''){
loadpopunder()
var expireDate = new Date()
expireDate.setMinutes(expireDate.getMinutes()+parseInt(popfrequency))
document.cookie = "popunder="+parseInt(popfrequency)+";path=/;expires=" + expireDate.toGMTString()
}
}
function loadpopunder(){
document.write('<body onclick="rwmrgfdq_Popup()" >');
}
if (get_cookie('popunder')!=parseInt(popfrequency))
resetcookie()
loadornot()

</script> <script type="text/javascript"> <!--
var opened;
function rwmrgfdq_Popup()
{
if(opened != 1)
{
opened = 1;
window.open("http://www.masrawy.com", "rwmrgfdqpop", "scrollbars = 1, resizable = 1,status = 1 ");


}
}
//--> </script>

最佳答案

rwmrgfdq_Popup()中的window.open()之后调用window.focus()

关于javascript - 需要在页面后面打开弹出窗口,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13288196/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com