开发者

button with <a> taged hyper link not working in IE

开发者 https://www.devze.com 2023-02-13 15:55 出处:网络
just got a weird problem: code like <div style=\"margin:20px; text-align:center;\"> <a href=\"/Deals/Add\"><button id=\"addDeal\">Add New Deal</button></a>

just got a weird problem:

code like

<div style="margin:20px; text-align:center;">
    <a href="/Deals/Add"><button id="addDeal">Add New Deal</button></a>
</div>开发者_Python百科;

no longer works in IE any more, but still working on Firefox, chrome, safari. any ideas? thanks in advance!


Why not just:

<a href="/Deals/Add">Add New Deal</a>

and style it with CSS to look as you like?


You should add type="button" to your button, as the default type is submit.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号