-1

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.

Ciro Santilli OurBigBook.com
  • 347,512
  • 102
  • 1,199
  • 985
  • You need to show what you have tried and where you are stuck or you won't get an answer. – DF_ Oct 11 '14 at 01:49

1 Answers1

0

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.

Meer
  • 1,006
  • 10
  • 15