I need a javascript code for this function.
When a user visits the website , a window pops up with a message asking the user to set a website as HOME PAGE for their browser.
I need a javascript code for this function.
When a user visits the website , a window pops up with a message asking the user to set a website as HOME PAGE for their browser.
ok here is the script you need:
<a href="#" onClick="this.style.behavior='url(#default#homepage)';this.setHomePage('http://www.yoursite.com');">Set as homepage</a>
for a button use this code:
<button onClick="this.style.behavior='url(#default#homepage)';this.setHomePage('http://www.yoursite.com');">Set as homepage</button>
But dont put it in a code where it popsup every time a user visits the page. It is a bad practice.