網頁調用本地客戶端(以有道詞典爲例)

編寫註冊表配置文件

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Dahua]
@="DahuaProtocol"
"URL Protocol"="C:\\Users\\Administrator\\AppData\\Local\\youdao\\dict\\Application\\YoudaoDict.exe"

[HKEY_CLASSES_ROOT\Dahua\DefaultIcon]
@="C:\\Users\\Administrator\\AppData\\Local\\youdao\\dict\\Application\\YoudaoDict.exe,1"

[HKEY_CLASSES_ROOT\Dahua\shell]

[HKEY_CLASSES_ROOT\Dahua\shell\open]

[HKEY_CLASSES_ROOT\Dahua\shell\open\command]
@="\"C:\\Users\\Administrator\\AppData\\Local\\youdao\\dict\\Application\\YoudaoDict.exe\" \"%1\""

另存爲 .reg 註冊表文件,以後雙擊添加到註冊表shell

網頁調起

<a href="dahua://">打開有道客戶端</a>
<!-- <a href="dahua://message/?uin=1234567&Site=Sambow&Menu=yes">打開有道客戶端</a> -->
相關文章
相關標籤/搜索