How to redirect to ios settings in Safari use javascript in ios9 - Stack Overflow

admin2025-04-21  2

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

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.

I think this can be realized by javascript.

Does anyone knows how to do this?

Note: I am using iOS9.

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

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.

I think this can be realized by javascript.

Does anyone knows how to do this?

Note: I am using iOS9.

Share Improve this question edited Nov 13, 2015 at 10:27 Song Yongtao asked Nov 13, 2015 at 3:42 Song YongtaoSong Yongtao 8351 gold badge8 silver badges18 bronze badges 3
  • @Jonathan thanks,my english is not good enough – Song Yongtao Commented Nov 13, 2015 at 3:52
  • If the website can do it, why not just look at the source to see how it works? – Simon MᶜKenzie Commented Nov 13, 2015 at 3:58
  • @SimonMᶜKenzie I've seen the source,unfortunately I didn't find it. – Song Yongtao Commented Nov 13, 2015 at 4:00
Add a ment  | 

2 Answers 2

Reset to default 4

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

This is my code:

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

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";

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

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

And I found the Preference list http://iphonedevwiki/index.php/Preferences.app

I've seen a similar question like this and here is the answer. The only thing you have to change and figure out is the link to the application.

The SO question

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1745215707a290837.html

最新回复(0)