当我们想要使用bootstrap为像电子邮件这样的文本框等输入框提供信息时,如何显示工具提示信息。
function signup()
{
if($('#name').val().length==0)
{
//show tooltip messege that this box is empty
}
}
<div class="form-group">
<label for="name">Name of the Company/Individual:</label>
<input type="text" class="form-control" id="name">
</div>
<div class="btn-group btn-group-justified">
<a href="#" class="btn btn-primary" onclick="signup()">Submit</a>
<a href="#" class="btn btn-primary">Clear</a>
</div>
答案 0 :(得分:0)
<div class="form-group margin-bottom-20">
<div class="input-group">
<input type="radio" name="userType" id="ind" value="INDIVIDUAL"><span class="test" data-toggle="tooltip" title="Individual tooltip message." data-placement="right" > Individual</span>
<input type="radio" name="userType" id="corp" value="CORPORATION"><span class="test" data-toggle="tooltip" title="Corporation tooltip message." data-placement="left" > Corporation </span
</div>
</div>
使用bootstrap css