<按钮和GT;在IE8不工作 [英] <button> not working in IE8

查看:127
本文介绍了<按钮和GT;在IE8不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一些按钮上使用按钮标记自己的网站,而IE8渲染很好,他们是不能点击(点击他们不会将用户发送到新的URL)。是否有任何解决方案,以解决这个问题的IE浏览器?难道是因为我在包装标签按钮?难道是因为我使用的按钮的类名?

在code是:

 < A HREF =product_home.html>
<按钮类=按钮,绿色big_button>了解详情< /按钮>
&所述; / A>


解决方案

您的标记是错的,IE浏览器是不是在这里有毛病。按钮,这意味着它需要周围点的形式,用户应该发送的表单元素 - 包装该按钮的链接标签是远远不够的,也不准确有效,其实我不认为它应该在任何地方工作,不即使是在其他浏览器。

要了解更多关于&LT正确使用按钮/> ,请访问的 XHTML参考:按钮

I have a number of buttons on my website using the button tag, and while rendering fine on IE8, they are not clickable (clicking them doesn't send the user to the new url). Are there any solutions to fix this for IE? Is it because I'm wrapping the button in an tag? Is it because I'm using a class name of "button"?

The code is:

<a href="product_home.html">
<button class="button green big_button">Learn more</button>
</a> 

解决方案

Your markup is wrong, IE is not in fault here. Button is a form element which means that it requires a form around it point where the user should be sent - wrapping the button into a link tag isn't enough nor exactly valid, in fact I don't think it should work anywhere, not even in other browsers.

To read more about correct usage of <button/>, visit XHTML Reference: button

这篇关于&LT;按钮和GT;在IE8不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆