大家好,给大家分享一下苹果ipad怎么开启麦克风权限,很多人还不知道这一点。下面详细解释一下。现在让我们来看看!

The hottest device out there right now seems to be the iPad. iPad this, iPad that, iPod your mom. I'm underwhelmed with the device but that doesn't mean I shouldn't try to account for such devices on the websites I create. In Apple's developer tip sheet they provide the iPad's user agent string:
目前最热的设备似乎是iPad。 iPad这,iPad那,iPod你的妈妈Deepl降重。 我对设备不满意,但这并不意味着我不应该在自己创建的网站上考虑此类设备。 在Apple的开发人员提示中,他们提供了iPad的用户代理字符串:
Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B334b Safari/531.21.10
Given that string we can create a few code snippets to determine if the user is being a smug, iPad-using bastard.
给定该字符串,我们可以创建一些代码段,以确定用户是否是自欺欺人,使用iPad的混蛋。
JavaScript (The JavaScript)
// For use within normal web clients
var isiPad = navigator.userAgent.match(/iPad/i) != null;
// For use within iPad developer UIWebView
// Thanks to Andrew Hedges!
var ua = navigator.userAgent;
var isiPad = /iPad/i.test(ua) || /iPhone OS 3_1_2/i.test(ua) || /iPhone OS 3_2_2/i.test(ua);
A quick String.match regular expression test can check for the presence of "iPad" in the user agent string.
快速的String.match正则表达式测试可以检查用户代理字符串中是否存在“ iPad”。
PHP (The PHP)
$isiPad = (bool) strpos($_SERVER['HTTP_USER_AGENT'],'iPad');
This time we look for the position of "iPad" in the user agent string.
这次,我们在用户代理字符串中寻找“ iPad”的位置。
.htaccess (The .htaccess)
RewriteCond %{HTTP_USER_AGENT} ^.*iPad.*$
RewriteRule ^(.*)$ http://ipad.yourdomain.com [R=301]
Using some logic from Drew Douglass' excellent mobile redirection post, we can redirect users to a mobile version of your website if you so desire.
使用Drew Douglass出色的移动重定向文章中的一些逻辑,如果您愿意,我们可以将用户重定向到您网站的移动版本。
So what would you the above tests for? You may want to redirect iPad users to a different version of your website. You may want to implement different styles to your standard website if your user is surfing on an iPad.
那么您对以上测试的目的是什么? 您可能需要将iPad用户重定向到您网站的其他版本。 如果您的用户在iPad上冲浪,则可能要对标准网站实施不同的样式。