Scheme协议
scheme 是一种页面之间跳转的协议,不仅可以用于app之间进行跳转,还可以用于 H5 页面跳转到app页面,可以通过在H5页面中打开 scheme 协议的地址,从而打开本地app。
[scheme:][//host:port][path][?query][#fragment]
scheme : 协议名称 - 必须
host : 协议地址 - 必须
port : 协议的端口,可以不填
path : 协议路径,可用 / 连接多个
query : 携带的参数可用 & 连接多个
fragment : 锚点
导入注册表脚本脚本或者编辑windows注册表
注册表脚本,在windows上双击运行脚本
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\ZZO]
@=""
"URL Protocol"=""
[HKEY_CLASSES_ROOT\ZZO\DefaultIcon]
@="C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe"
[HKEY_CLASSES_ROOT\ZZO\shell]
@=""
[HKEY_CLASSES_ROOT\ZZO\shell\open]
@=""
[HKEY_CLASSES_ROOT\ZZO\shell\open\command]
@="C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe"
html页面
<html>
<body>
<a href="ZZO://">open</a>
</body>
</html>
运行html页面,结果如下
点击页面 open ,即可打开本地chrome应用