Show once popup
Say I wanted to create a pop开发者_如何学JAVAup for my website that only showed once (if the user either filled it out or clicked the "do not display again" button), how would I do so. I am creating the popup and form using javascript and html, passing it in php to a database.
The easiest way would be to use a cookie which would be downloaded to the client's computer. When your webpage loaded, it would need to check for this cookie, and if not found, or a flag inside it had a property "noPopup=true" for instance, not display the popup.
精彩评论