url地址是 market://details?id=com.juphoon.justalk&referrer=utm_source=newheaderen
我在网页上 用a连接href="market://details?id=com.juphoon.justalk&referrer=utm_source=newheaderen"可以跳转,
但是用 window.location.href= "market://details?id=com.juphoon.justalk&referrer=utm_source=newheaderen" 则无效,
求大神解答,
附上源码
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<input type="text">
<a href="market://details?id=com.juphoon.justalk&referrer=utm_source=newheaderen">测试一下</a>
</body>
<script type="text/javascript">
setTimeout(function(){
window.location.href = "http://www.baidu.com";//可以跳转
window.location.href = "market://details?id=com.juphoon.justalk&referrer=utm_source=newheaderen";//不会跳转
},2000)
</script>
</html>
借花献个佛,看下是不是这个原因,window.location.href 不跳转,如果不是贴上你那window.location.href前后的代码我看看