我需要在jquery中使该页面成为浏览器中默认主页网站的脚本 [英] i need script in jquery that make the page as your default home page website in the browser

查看:104
本文介绍了我需要在jquery中使该页面成为浏览器中默认主页网站的脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要jquery/javascript中的脚本,以使特定网站成为浏览器中的首页, 如果可能的话,我需要它与所有浏览器都兼容.

i need script in jquery / javascript that make the specific site as the homepage in the browser, i need it compatible for all browsers , if that possible .

我不是说应该自动完成,

i dont mean it should be done automatically ,

谢谢.

推荐答案

在Internet Explorer 7和更早版本中,可以使用

In Internet Explorer 7 and earlier it was possible to do this using

document.setHomePage("http://www.mywebsite.com/");

但是,这在较新的版本中是不可能的(因为它被认为存在安全风险),而在其他浏览器(如Firefox)中则从来没有.

However, this is not possible in more recent version (as it is considered a security risk) and has never been possible in other browsers like Firefox.

最好的后备方法是实际上指导用户如何更改主页,而不是以编程方式尝试完成主页.

The best fallback is to actually instruct the user how to change home page instead of programatically trying to accomplish it.

在Firefox(我不确定其他浏览器)中,用户可以拖动链接并将其放在主页按钮上,从而(确认后)更改起始页面.您可以通过指示用户拖动图像(位于链接到您网站的锚标签内)并将其放到主页按钮上来加以利用.

In Firefox (I'm not sure about other browsers) it is possible for the user to drag a link and drop it on the home button, and thereby (after confirming) changing the start page. You may utilize this by instructing the user to drag an image (that is inside an anchor tag linking to your website) and drop it on the home button.

这篇关于我需要在jquery中使该页面成为浏览器中默认主页网站的脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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