访问网站后显示弹出窗口 [英] Displaying a popup after visiting a website

查看:89
本文介绍了访问网站后显示弹出窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我想在用户访问后在网站上显示一个弹出窗口。



目前我这样做是通过使用document.ready从我的主页激发javascript,但每次用户返回主页而不关闭网站时,都会显示弹出窗口。



我想在网站加载后弹出一次才被解雇。如何实现这个?



谢谢

Hi All,

I want to display a popup in a website after a user visits it.

Currently I am doing this by firing a javascript from my homepage using document.ready, but everytime the user comes back to the homepage without closing the website, the popup is displayed.

I want to popup to get fired only once after the website is loaded. How to achieve this??

Thanks

推荐答案

你需要把它存放在某个地方。



不确定这是否是一个匿名网站,但无论如何,如果用户访问过cookie中的网站,服务器上的数据库等,该选项都可以存储。 br />


在准备好文件时,检查你是否已经显示了弹出窗口,否则继续显示消息。
You need to store it somewhere.

Not sure if this is an anonymous site, but irrespective of that the option could be to store if the user has visited site in cookie, database on sever etc.

In document ready, check if you have already shown the popup once otherwise go ahead and show the message.


http://www.aspdotnet-suresh.com/2012/12/show -subscribe-modal-popup-for-website.html [ ^ ]



试试这个链接
http://www.aspdotnet-suresh.com/2012/12/show-subscribe-modal-popup-for-website.html[^]

try this link


这篇关于访问网站后显示弹出窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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