繁体   English   中英

在 chrome 中启动 html 文件时出现问题

[英]issue when launching html file in chrome

当我在 chrome 浏览器中启动 html 文件时,如果我们尝试 append 关键字和 GUID 与 url, '#' '%23'替换为但它与 Internet Explorer 一起正常工作。 为什么?

string arg = "index.html" + "#" + guid;
processBrowser.StartInfo.Arguments = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), arg);

您应该使用decodeURIComponent方法并传递参数。

processBrowser.StartInfo.Arguments = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), decodeURIComponent(arg));

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM