5

I created an application to act as a protocol handler, the registry are set up according to http://msdn.microsoft.com/en-us/library/ie/aa767914(v=vs.85).aspx

Then in the webpage I have something like:

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

If I click the link, the app is launched and "testapp:arg1" is passed in as an argument.

Now I want to pass multiple arguments to the handler. I'm guessing in the "command" registry key, I would have "path_to_exe" "%1" "%2". However I can't figure out how to write the html link to supply multiple arguments.

Is it possible to pass multiple arguments? If so, how do I do it and are there differences between different browsers?

4

1 に答える 1

1

URIスキームへのアプリケーションの登録では、次のように述べています

ユーザーがカスタム URI スキームを含むリンクをクリックすると、Windows Internet Explorer は、その URI スキームに登録されているプラ​​グ可能なプロトコル ハンドラーを起動します。レジストリで指定された open コマンドに %1 パラメータが含まれている場合、Internet Explorer は URI を登録済みのプラグ可能プロトコル ハンドラ アプリケーションに渡します。

つまり、スペースは URI 全体の文字として扱われます。

于 2015-11-30T03:20:01.600 に答える