打开网页自动下载APP
2024-10-22 08:39:03
整体主要使用script控制,目前Android通过,iOS未测试。
a标签源码部分
<a id="Download"href="javascript:;">点击这里</a>
Script源码部分
<script type="application/javascript">
var anspk = "#";//APP链接
var al = document.getElementById("Download");
window.location.href = anspk;
al.onclick = function() {
window.location.href = anspk
}
</script>
全段源码
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Android APP Download</title>
<style>
a{text-decoration:none}
a{color:#FF0000;}
p{color:#008000;}
</style>
</head>
<body>
<h1 style="text-align: center">
<p>APP将自动下载</p>
</h1>
<h3 style="text-align: center">
<p>如果没自动下载,<a id="Download"href="javascript:;">点击这里</a>手动下载……</p>
</h3>
<script type="application/javascript">
var anspk = "#";//安卓APK链接
var al = document.getElementById("Download");
window.location.href = anspk;
al.onclick = function() {
window.location.href = anspk
}
</script>
</body>
</html>
最新文章
- Yii2的邮件配置
- [Debian]8.2升8.3
- js编译器的一些简单原理
- 小白学数据分析----->;留存率与运营活动分析_I
- 【多线程】Future和FutureTask以及CompletionService
- Top 10 Programming Fonts
- 解析搜狗词库(python)
- magnific-popup 一款优秀, 多种功能于一身的弹出层jQuery插件.
- Ubuntu12.04下安装NS3.25
- decorator 装饰页面,根据不同设备自动切换移动和pc站
- thinkphp5分页传参
- java面向对象编程(三)--this
- vue之component
- Python邮件发送脚本(Linux,Windows)通用
- centos 下 mysql+keepalived实现双主自由切换
- 1109 Group Photo (25 分)
- PS-点击选中某一个图层
- STL标准库-容器-unordered_set
- 深入理解那该死的BOM
- oracle汉字转拼音
热门文章
- Java控制流程(复习)
- 微服务减少jar包体积
- 路飞项目day01 软件开发流程、PIP永久换源、虚拟环境、路飞项目开始
- day11 事件相关笔记
- windows terminal用ssh连接已重装的服务器提示REMOTE HOST IDENTIFICATION HAS CHANGED!
- VSCode+EIDE开发CH32V系列RISC-V MCU
- synchronized与CAS
- 实验1task2
- 如何查看nvidia官网发布的tensorrt镜像中都包含哪些包,trt版本是多少,cuda版本是多少?如何查看nvidia官网发布的triton镜像中都包含哪些包?
- git将本地文件上传到远程仓库