我只是很高兴用引导程序构建我自己的东西。我想知道使用 Bootstrap 3 向容器添加边框的最佳方法是什么?我很难在 bootstrap 中找到内置功能,我想知道如果我想将文本括在边框中,最好的方法是使用下面的代码。
<div class="container-fluid">
<div class="row">
<div class="col-md-12"><p class="text-center">Welcome.</p></div>
</div>
</div>
Run Code Online (Sandbox Code Playgroud) 我想根据下拉列表的选择显示一个单独的 div 标签,我正在使用 ModelForm 创建我的模板。我不确定如何在我的 ModelForm 中添加 javascript。
表格.py
class CustomerForm(forms.ModelForm):
name = forms.CharField(widget=forms.TextInput(attrs={'placeholder': 'Customer Name '}))
address = forms.CharField(widget=forms.TextInput(attrs={'placeholder': 'Customer Address'}))
phone_number = forms.IntegerField(widget=forms.TextInput(attrs={'placeholder': 'Customer Phone Number '}))
email = forms.EmailField(widget=forms.TextInput(attrs={'placeholder': 'Customer Email'}))
contact_person = forms.CharField(widget=forms.TextInput(attrs={'placeholder': 'Contact person'}))
# amc = forms.BooleanField(widget=forms.TextInput(attrs={'placeholder': 'type "amc" if the customer is in AMC'}))
amc_date = forms.DateField(widget=forms.TextInput(attrs={'placeholder': 'ex: Jan 20, 1996','id':'disabledInput'}))
amc_product = forms.CharField(widget=forms.TextInput(attrs={'placeholder': 'Products listed in AMC'}))
# warranty = forms.BooleanField(widget=forms.TextInput(attrs={'placeholder': 'Type "warranty" if the customer is in Warranty'}))
warranty_date = forms.DateField(widget=forms.TextInput(attrs={'placeholder': …Run Code Online (Sandbox Code Playgroud) 我使用的是bootstrap3。我需要在 jquery 中发生更改事件时获取 taginput 的值。我提到了贝尔波代码
<input type="text" name="tag_name" id="tagchange" class="form-control" value="" data-role="tagsinput">
Run Code Online (Sandbox Code Playgroud)
我无法在更改事件时获得这些值
$('#tagchange').change(function(){
alert($('#tagchange').val())
});
Run Code Online (Sandbox Code Playgroud)
我不知道发生了什么,但是突然我收到了这个错误:
指定的模板库无效。尝试加载“ bootstrap3.templatetags.bootstrap3”时引发ImportError:无法导入名称“ flatatt”
有任何想法吗?