1、String成员方法(常用)bool Contains(String str);判断字符串对象是否包含给定的字符串;bool StartsWith(String str);判断字符串对象是否以给定的字符串开始;bool EndWith(String str);判断字符串是否以给定的字符串开始;i...
分类:
Web程序 时间:
2015-06-03 20:58:18
阅读次数:
138
JavaScript采用正则表达式实现startWith、endWith效果函数String.prototype.startWith=function(str){ var reg=new RegExp("^"+str); return reg.test(this);}String.prototype...
分类:
Web程序 时间:
2014-08-18 15:44:12
阅读次数:
221
加法
django中自带过滤add
{{ num|add:'12' }}
这样就表示num加12,有了加就有减法了~~~
还可以{{ num|add:total }}还可以与其他属性相加
变量赋值
{% with distance=5 %}
{# 自定义的属性只在with标签内可用 #}
{% endwith %}...
分类:
其他好文 时间:
2014-08-14 14:17:08
阅读次数:
2052