AppCan中调用系统浏览器打开网页

<!DOCTYPE html>
<html>
<head>
<style>body{ background:#fff; font-size:30px;}</style>
<meta charset="utf-8">
<script>
function openUrl(url){
    if(uexWidgetOne.getPlatform()=='0'){
        //IOS设备
        uexWidget.loadApp(url,'','');
    }else{
        //android设备
        uexWidget.loadApp('android.intent.action.VIEW','text/html',url);
    }  
}
</script>
</head>
<body>
<input type="button" value="打开网页" onclick="openUrl('http://ciniao.me/appcan/down')"/><br/>
</body>
</html>

本文转载自:http://ciniao.me/appcan/?id=39

你可能感兴趣的:(浏览器)