php - 输入类型在带有锚点和标签的 IE 7 和 8 中不起作用
问问题
1369 次
1 回答
5
您的代码是错误的,您不需要围绕输入元素的锚标记。它应该看起来像:
<a href="<?php echo $url; ?>" id="quotenow" class=""><span class="blue_btn">My Anchor</span></a>
或者,如果您想要按钮上的 onclick 事件,那么您可以执行以下操作:
<!-- this uses javascript to get the result.
Typically button and input elements are
processed by a form which you'll see in the demo -->
<button onclick="window.open('<?php echo $url; ?>', '_self'); return false;"><span class="blue_btn">My Button</span></button>
以下是元素输入不得作为 a 元素的后代出现的规则。这是一个演示。
于 2013-01-14T06:35:16.577 回答