在JavaScript中设置默认主页 [英] Set default home page in JavaScript

查看:179
本文介绍了在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.

这篇关于在JavaScript中设置默认主页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆