html - 具有多个参数的协议(protocol)处理程序

标签 html c++ url browser protocol-handler

我创建了一个应用程序来充当协议(protocol)处理程序,注册表是根据 http://msdn.microsoft.com/en-us/library/ie/aa767914(v=vs.85).aspx 设置的

然后在网页中我有类似的东西:

<a href="testapp:arg1">Test App</a>

如果我单击该链接,应用程序将启动,并且“testapp:arg1”作为参数传入。

现在我想将多个参数传递给处理程序。我猜在“命令”注册表项中,我会有 "path_to_exe""%1""%2"。但是我不知道如何编写 html 链接以提供多个参数。

是否可以传递多个参数?如果是,我该怎么做?不同浏览器之间是否存在差异?

最佳答案

Registering an Application to a URI Scheme , 它说

When a user clicks a link containing your custom URI scheme, Windows Internet Explorer launches the pluggable protocol handler registered for that URI scheme. If the specified open command specified in the registry contains a %1 parameter, Internet Explorer passes the URI to the registered pluggable protocol handler application.

这意味着,空格将作为整个 URI 中的字符处理。

关于html - 具有多个参数的协议(protocol)处理程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24718450/

相关文章:

css - 在Jinjia2中,如何在html样式中使用变量值?

php查询数据库打印到带有标题的html表

c++ - 如何在 Haxe 项目中使用简单的 C++ 代码?

c++ - 后缀运算符重载顺序

http - 在 URL 路径中必须同等对待 '@' 和 '%40' 吗?

javascript - 如何修复 JavaScript 中的 Number.isInteger() 函数

javascript - 如何加载不同的HTML文件来创建不同的场景/VR世界?

c++ - C++ 中的对象分配

java - @RequestMapping 参数在路径中间

c# - 我如何检查http链接中是否有错误,然后继续?