前端基础

写在前面:

  做后台的也得明白点前端的啊,不然的话,会死得很惨。

 

篇一:html

 

 

 

篇二:javascript

 

 

篇三:velocity

http://blog.sina.com.cn/s/blog_4b01279a0100hc6o.html

  1.判断对象是否为空。

    总统上说,判断是否为null有下面几种方法:

    1. #if (! $foo) 判断$foo为空,判断非空为 #if ($foo)

    2. 使用 #ifnull() 或 #ifnotnull()

    #ifnull ($foo)

    要使用这个特性必须在velocity.properties文件中加入:

userdirective = org.apache.velocity.tools.generic.directive.Ifnull
userdirective = org.apache.velocity.tools.generic.directive.Ifnotnull

    3. 使用null工具判断

    #if($null.isNull($foo))

    注意这种方式特别有用,尤其你在需要这个判断作为一个判断字句时,比如我要你判断一个集合为null或为空时只能使用这种方式了:

    $if ($null.isNull($mycoll) || $mycoll.size()==0)

 

http://blog.csdn.net/happy_cheng/article/details/43769725

(1)判断null

#if( $name  ==  null)

 something code

#end

(2)判断null或者false

#if( !$name)

 something code

#end

(3)判断null或者空字符串

#if( "$!name" == "")

 something code

#end

 

 

篇四:未完待续。。。

posted on 2016-04-06 10:19  是知也  阅读(158)  评论(0编辑  收藏  举报

导航