一只叫花花的小小鸟

导航

用js完成下载功能(window.open(url))

<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title></title>
</head>
<body>
<script>
function downLoad(){
window.open("http://ip/apkVersion/Setup.exe");
}
</script>

<a href="#" onClick="downLoad()">点击下载</a>
</body>
</html>

注:但是这种方式存在跨域问题,网页和包需要在同一个服务器上

posted on 2017-06-07 16:19  一只叫花花的小小鸟  阅读(9282)  评论(0编辑  收藏  举报