Show popup text message when somebody visits on your website
Just edit yellowish marked lines inwards your text as well as glue this code afterward <head> inwards your index.html webpage or on other webpage where y'all desire to present popup message.
<script>
//Alert message i time script past times Vishal Jaiswal.
//Visit http://www.vikinspire.com for this script.
//specify message to alert
var alertmessage="Welcome to website."
///No editing required beyond here/////
//Alert solely i time per browser session (0=no, 1=yes)
var once_per_session=1
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
// ready index of showtime of value
destination = document.cookie.indexOf(";", offset);
// ready index of destination of cookie value
if (end == -1)
destination = document.cookie.length;
returnvalue=unescape(document.cookie.substring(offset, end))
}
}
provide returnvalue;
}
function alertornot(){
if (get_cookie('alerted')==''){
loadalert()
document.cookie="alerted=yes"
}
}
function loadalert(){
alert(alertmessage)
}
if (once_per_session==0)
loadalert()
else
alertornot()
</script>
Belum ada Komentar untuk "How to exhibit popup text message on website visits?"
Posting Komentar