簡體   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