繁体   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