hyperlink not in whole button
This question already has an answer here:
You are putting an input tag inside an anchor tag which is not possible.
I guess you are using Twitter bootstrap which btn
classes can be given too <a>
tag too and make them look like buttons, so you can do:
<div class="checksheet">
<a href="http://some_link" target="_blank" class="btn btn-large btn-primary">
Graph Search
</a>
</div>
<div class="nchecksheet">
<form action="/link" method="POST">
<input class="btn btn-large btn-primary" type="submit" value="Analyze Topics" onclick="$('#loading').show();">
</form>
<div id="loading" class="hide" style="position: relative; left:860px;">
<img src="{{ url_for('static', filename='img/newload.gif') }}" alt="" />
</div>
</div>
尝试...
<div class="checksheet">
<input type=button class="btn btn-large btn-primary" onClick="location.href='http://some_link'" value='Graph Search'>
</div>
<div class="nchecksheet">
<input type=button class="btn btn-large btn-primary" onClick="location.href='http://some_link'; onclick="$('#loading').show();" value='Analyze Topics'>
<div id="loading" style="display:none; position:relative ;left:860px"><img src="{{ url_for('static', filename='img/newload.gif') }}" alt="" /></div>
</div>
链接地址: http://www.djcxy.com/p/36560.html
上一篇: 使用按钮而不是href
下一篇: 超链接不在整个按钮中