在JavaScript中设置默认主页

问题描述:

我如何创建一个链接到用户的主页设置为我的网址?

How do I create a link to set the user's home page to my URL?

至于有些人已经回答了,它曾经是在Internet Explorer中可以使用类似的东西来(之前的IE 7,我相信,可能是错的)

As some people have already answered, it used to be possible in internet explorer (prior to IE 7 I believe, could be wrong though) using something similar to

document.setHomePage('www.example.com');

我不认为任何浏览器支持它了,虽然。不过,我肯定会试图说服你不这样做。大多数人会不喜欢有它们的设置自动更改,即使它通过鼠标点击或其他行动触发。它也很可能是过分热心的保护程序会跳到了这一切并加盖它作为恶意攻击。

I don't think any browser supports it anymore though. However, I would definitely try to convince you to do otherwise. Most people won't like having their settings automatically changed, even if it's triggered by a mouse click or other action. It's also quite likely that overzealous 'protection' programs will jump all over it and stamp it as a malicious attack.