2016-12-14 66 views
0

我使用mvc actionlink來獲取url。它在鉻中工作正常。但在IE瀏覽器甚至沒有點擊。我使用下面的代碼來導航頁面。如果使用Url.Action,超級鏈接無法在Internet Explorer上單擊

<a href="@Url.Action("GetHelpDocuments", "Document")"> 
      <span class="navsprite helplink"></span> 
      <span>Help</span> 

我在上面的代碼中找不到任何錯誤。但請爲此提供備用解決方案。

+0

閱讀[問]並提供[MCVE。這裏的相關內容是生成的HTML和應用到它的CSS,以及頁面上運行的任何JavaScript。 – CodeCaster

+0

http://stackoverflow.com/questions/13696793/asp-net-mvc-razor-url-action-doesnt-work-in-internet-explorer-8 - 請看看這個。 – FakeisMe

回答

0

我用localtion.href獲得的實際位置HREF

<a href="@Url.Action("GetHelpDocuments", "Document")" onclick='location.href = this.getAttribute("href")'> 
      <span class="navsprite helplink" ></span> 
      <span>Help</span>