警告:/www/wwwroot//wp-content/themes/Snape/single.php中第45行的字符串偏移量“ top”
1.该代码可以在Android上使用,但不适用于Apple。这两个版本的支付宝内置浏览器是否不同?请解决
2.
window.onload = function(){
if(isWeiXin()){
alert("微信");
}else if(isZFB()){
alert("支付宝");
}else{
alert("其他");
}
}
function isWeiXin(){
var ua = window.navigator.userAgent.toLowerCase();
if(ua.match(/MicroMessenger/i) == 'micromessenger'){
return true;
}else{
return false;
}
}
function isZFB(){
var ua = window.navigator.userAgent.toLowerCase();
if(ua.match(/AlipayClient/i) =='alipayclient'){
return true;
}else{
return false;
}
}
这似乎是由于支付宝的安全性问题所致,这要求其经过身份验证的URL能够访问。最后,谢谢大家
也许苹果和Android的UA标签不同,只是获得苹果的UA匹配!
function isWeChat() {
return navigator.userAgent.indexOf('MicroMessenger') != -1 ? true : false;
}
Android似乎是UC,ios应该是Safar
警告:/www/wwwroot//wp-content/themes/Snape/single.php中第49行的字符串偏移'footer'
本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/shumachanpin/article-315245-1.html