我需要从设备本机浏览器打开一个链接。我更喜欢启动外部链接的引导路径。但它在模拟器中工作正常但在设备中不工作。以下是我的代码
<head>
<meta charset="UTF-8">
<link rel="stylesheet" type="text/css" href="bootstrap/css/bootstrap.min.css">
<title>Blank App Designer Project Template</title>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<style>
@-ms-viewport { width: 100vw ; zoom: 100% ; } @viewport { width: 100vw ; zoom: 100% ; }
@-ms-viewport { user-zoom: fixed ; } @viewport { user-zoom: fixed ; }
/*@-ms-viewport { user-zoom: zoom ; min-zoom: 100% ; max-zoom: 200% ; } @viewport { user-zoom: zoom ; min-zoom: 100% ; max-zoom: 200% ; }*/
</style>
<link rel="stylesheet" href="css/app.css">
<link rel="stylesheet" type="text/css" href="css/index_main.less.css" class="main-less">
<script src="intelxdk.js"></script>
<script src="cordova.js"></script>
<script src="xhr.js"></script>
<script src="js/app.js"></script>
<script src="js/init-app.js"></script>
<script src="xdk/init-dev.js"></script>
</head>
<body>
<div class="upage vertical-col left" id="mainpage">
<button class="btn widget uib_w_1 d-margins btn-default" data-uib="twitter%20bootstrap/button" data-ver="1" id="openbro" onclick="return Bro();">open browser</button>
</div>
<script>
function Bro(){
alert("test");
intel.xdk.device.launchExternal("http://www.google.com");
//window.location='http://www.google.com';
}
</script>
</body>