Twitter bootstrap 如何使用bootstrap框架在popover中放置表单?

Twitter bootstrap 如何使用bootstrap框架在popover中放置表单?,twitter-bootstrap,Twitter Bootstrap,我想做的是在popover中放置一个简单的表单,现在我的popover工作正常,但当我将表单放入popover中时,它不工作 这是我的输出 这是我的密码 <a href="#" class="btn" rel="popover" data-placement="bottom" data-content=" <form class='form-horizontal'> <div class='control-group'> <label class='cont

我想做的是在popover中放置一个简单的表单,现在我的popover工作正常,但当我将表单放入popover中时,它不工作

这是我的输出

这是我的密码

<a href="#" class="btn" rel="popover" data-placement="bottom" data-content="
<form class='form-horizontal'>
<div class='control-group'>
<label class='control-label' for='inputEmail'>Start Date</label>
<div class='controls'>

<input type='text' class='span3 ' name='start_date' id='start_date' placeholder='News Date' value='<?php echo date('d-m-Y'); ?>' >
</div>
</div>
<div class='control-group'>
<label class='control-label' for='inputEmail'>End Date</label>
<div class='controls'>
<input type='text' id='end_date' name='end_date' placeholder='End Date' class='input-xlarge uneditable-input'>
</div>
</div>
</form>" title="Popover on bottom">         
</a>

这是教我做这种事情的url


我的引导版本是2.2.2,你知道如何解决我的问题吗?谢谢

您可以在包含popover的
标记上设置
数据html=“true”
,查看此JSFIDLE,我使用了3个简单按钮:

我在jquery变量中复制了html代码:

var mycontent='<div class="btn-group"> <button class="btn">Left</button> <button class="btn">Middle</button> <button class="btn">Right</button> </div>'  
var mycontent='Left-Middle-Right'
即使您删除了的
html:true,

可能的重复项,它也可以正常工作