gpt4 book ai didi

.net - Process.Start(url),url 中带有 anchor

转载 作者:行者123 更新时间:2023-12-02 11:09:40 25 4
gpt4 key购买 nike

我正在尝试使用 Process.Start 在默认浏览器中启动本地 html 文件。

示例网址如下:

"file:///C:/Documentation/HelpContent/default_CSH.htm#SectionA/Topic1.htm"

问题是,“#SectionA/Topic1.htm”位由于某种原因被删除,因此该信息不会传递到浏览器。不过,它对于非本地 url 确实可以正常工作。

有谁知道我如何让它发挥作用,或者这是某种预防性安全问题?

谢谢

最佳答案

iexplore.exe 上使用 Process.Start,以便您可以专门指定 URL 作为其参数:

System.Diagnostics.Process.Start("iexplore.exe", @"file:///c:/dir/file.html#anchor");

关于.net - Process.Start(url),url 中带有 anchor ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2404449/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com