如何在Safari中重定向到ios设置使用ios9中的javascript [英] How to redirect to ios settings in Safari use javascript in ios9

查看:150
本文介绍了如何在Safari中重定向到ios设置使用ios9中的javascript的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道如何从Safari重定向到iOS设置。

I want to know how to redirect to the iOS settings from Safari.

我在一个网站上看过这个:我在Safari中打开了这个网站,那里是一个按钮,当我单击此按钮时,它可以重定向到iOS设置。

I've seen this on one website: I opened this website in Safari, and there is a button, and when I click this button, it can redirect to the iOS settings.

我认为这可以通过javascript实现。

I think this can be realized by javascript.

有谁知道怎么做?

注意:我使用的是iOS9。

Note: I am using iOS9.

推荐答案

抱歉,我必须回答我自己的问题。我找到了解决方案。在ios9中进行了测试

Sorry,I have to answer my own question.I've found the solution.Just tested in ios9

这个是我的代码:

<input type="button" onclick="redirect()" value="Redirect">
<script>
    var redirect = function() {
        window.location.href = "prefs:root=Settings";
    }
</script>

当我在Safari中打开此页面并单击按钮时,它可以重定向到设置

When I open this page in Safari and click the button,it can redirect to the Settings

如果我想重定向到设置 - >常规,它应该是:

If I want to redirect to Settings->General,it should be:

window.location.href = "prefs:root=General";

如果我想重定向到设置 - > General->个人资料,然后应该是:

If I want to redirect to the Settings->General->Profiles,then should be:

window.location.href = "prefs:root=General&path=ManagedConfigurationList";

我找到了首选项列表 http://iphonedevwiki.net/index.php/Preferences.app

这篇关于如何在Safari中重定向到ios设置使用ios9中的javascript的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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