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

查看:28
本文介绍了在 JavaScript 中设置默认主页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何创建链接以将用户的主页设置为我的 URL?

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

推荐答案

正如一些人已经回答的那样,它曾经可以在 Internet Explorer 中使用类似

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天全站免登陆