admin管理员组文章数量:1279177
Bootstrap Button Link Not Working see code below:
<ul>
<li>
<a href="home.aspx?Id=146">
<button class="btn btn-primary btn">Button Link</button>
</a>
</li>
</ul>
I use firebug for development, is there an easy place to see what javascript events are attached and to which objects such as this button class? find it hard to debug as don't know what code is being called and on what events for bootstrap and other external js files
Bootstrap Button Link Not Working see code below:
<ul>
<li>
<a href="home.aspx?Id=146">
<button class="btn btn-primary btn">Button Link</button>
</a>
</li>
</ul>
I use firebug for development, is there an easy place to see what javascript events are attached and to which objects such as this button class? find it hard to debug as don't know what code is being called and on what events for bootstrap and other external js files
Share Improve this question edited Jan 24, 2014 at 12:35 Carol Skelly 363k91 gold badges735 silver badges646 bronze badges asked Jan 24, 2014 at 12:27 user3231982user3231982 451 gold badge2 silver badges5 bronze badges 1- 4 why do you need a button inside an anchor tag? simply add the "btn btn-primary" classes to the anchor tag – Abhidev Commented Jan 24, 2014 at 12:31
2 Answers
Reset to default 7Or, you can just use a link which looks like a button..
<a href="home.aspx?Id=146" class="btn btn-primary">Button Link</a>
Remove a
tag and add window.location.href
to button onclick
<button class="btn btn-primary btn"
onclick="window.location.href='home.aspx?Id=146'; return false;">
Button Link
</button>
本文标签: javascriptBootstrap Button Link Not WorkingStack Overflow
版权声明:本文标题:javascript - Bootstrap Button Link Not Working - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741219525a2360699.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论