11 2012 档案
摘要:在ModelForm中添加新的属性class AuthorForm(ModelForm): class Meta: model = Author widgets = { 'name': TextInput(attrs={'placeholder': 'name'}), }在Form的成员中添加属性q = forms.CharField(label='search', widget=forms.TextInput(attrs={'placeholder': 'Search'}))
阅读全文
摘要:下载CNTML http://cntlm.sourceforge.net/设置用户名密码 打开cntlm.ini文件,在Username,Domain, Password中写入相应的数据。 最后点击cntml.exe开始运行。设置程序代理 在程序代理中写入127.0.0.1:3128(默认设置)。程序就可以连到外面了。 在公司内使用github只能通过代理连上,因为GIT不支持ntml代理认证。
阅读全文
摘要:.attr(attributeName) attributeName:需要获取属性的名称。 获取匹配集中第一个元素的属性值。1.6中attr返回属性的值为undefined,如果没有设置(set)。另外,.attr不应该在普通对象、数组(array)、窗口(window)或者文档中(document)。如果需要获取或者设置DOM属性,则应该使用.prop()方法。 使用.attr方法获取元素属性的值有两个主要优点:方便(Convenience):这个方法可以在JQuery对象上直接调用和串联别的JQuery的方法。跨浏览器的一致性(Cross-browser consistency):有...
阅读全文

浙公网安备 33010602011771号