簡體   English   中英

href標簽在Internet Explorer中不起作用

[英]a href tag is not working in internet explorer

我正在使用頁面中的href標記創建一個按鈕,該標記在chrome中工作正常。 但在Internet Explorer中根本無法使用,按鈕的代碼是

 <td class='swMntTopMenu' style="text-align:right">
  <button style="background-color:rgb(255,213,32)">
     <a href ='list.php' style="text-decoration:none !important;">
       <div class="link"> Back  </div> 
     </a>
 </td>

和使用的樣式的代碼是

.swMntTopMenu
            {
                background-color: #E2E4E5;
                /* float: center;*/
                width: 5%;
                margin-top: 2px;
                padding-bottom: 6px;
                border-bottom: solid 1px #d0ccc9;
            }

.link
            {
                color: #0E0202;
                text-decoration: none;
                background-color: none;
            }

有人可以幫我嗎?

希望這會有所幫助

<a href ='list.php' style="text-decoration:none !important;"><button style="background-color:rgb(255,213,32)">  <div class="link"> Back </div> </button></a>

正如我在評論中所說,您沒有關閉button元素。 此外,你不能有a在一個button元素。

無論哪種風格的a看起來像一個按鈕-在這里是一個不錯的CSS按鈕生成

或將button放入表單- 如何創建充當鏈接的HTML按鈕?

在較舊的IE中,當您將div放入其中時,應該有助於A聲明為塊。

a {display: block}

請嘗試使用這種方式

<form action="list.php">
    <input type="submit" value="Back">
</form>

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM