c:if标签
2014-03-25 09:33
225 查看
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
Date d=new Date();
int hours=d.getHours();
session.setAttribute("h",hours);
%>
if标签
<c:if test="${sessionScope.h<12}">
小时:${h },
上午好
</c:if><br/>
<c:if test="${sessionScope.h ge 12 && h<=14}">
中午好
</c:if>
<c:if test="${sessionScope.h >14}">
下午好
</c:if>
<%
Date d=new Date();
int hours=d.getHours();
session.setAttribute("h",hours);
%>
if标签
<c:if test="${sessionScope.h<12}">
小时:${h },
上午好
</c:if><br/>
<c:if test="${sessionScope.h ge 12 && h<=14}">
中午好
</c:if>
<c:if test="${sessionScope.h >14}">
下午好
</c:if>
相关文章推荐
- VS2013中using System.Windows.Forms;引用不成功
- How To Build Your First F**king STAF Service
- 享元模式-对象结构型模式
- 读书入脑的最好方法
- Python hashlib模块 (主要记录md5加密)
- python使用循环实现批量创建文件夹示例
- 在 SELECT 查询中使用透视
- 在 SELECT 查询中使用透视
- Installation error: INSTALL_PARSE_FAILED_NO_CER...
- 在ListView中如何进行精确的定位
- NoSQL开篇
- 谢殿侠:尽在“掌”握:移动互联网时代的团队协作工具
- maven profile
- C++中数据对齐问题。struct、union、enum,类继承。再谈sizeof()
- 当DATABASE进入了suspect模式以后
- Python hashlib模块 (主要记录md5加密)
- 数据库主体在该数据库中拥有 架构,无法删除解决方法
- 如何在windows 2008 server 在桌面显示我的电脑等常用图标
- 网络百科——交换机
- vc 隐藏进程