1.
Jstl用法:
所需jar包:jstl*.jar
头部引入:<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
代码:
<c:choose >
<c:when test="${mapEl.agstatus == 'xxxx'}">
</c:when>
<c:otherwise>
</c:otherwise>
</c:choose>
eq:equal
ne:not equal
2.
关闭:window.close().
3.
request.getAttribute()获取的值是由request.setAttribute()设置的,并且要类型转换;
request.getParameter()获取的是请求中?ggg&hhh中的参数,不需要类型转换。
4.
相互库之间的数据导入:
insert intomydatabase.mytable(xxx,yyyy,zzzz) select * from otherdatabase.othertable;
执行后之后再commit
5.
判断是否被选中:document.getElementById("outer").checked!=true
document.all("selAll").checked = true;等价于 document.all.selAll.checked
6.
js设置固定格式的日期字符串:
js获取
var now = new Date();
var oneMonthAgo = new Date(now.setMonth(now.getMonth()-1));
//year
var datestr = oneMonthAgo.getFullYear();
//month
temp = oneMonthAgo.getMonth()+1;
if(temp<10) {
datestr+= "-0"+temp;
} else {
datestr+= "-"+temp;
}
//day
temp = oneMonthAgo.getDate();
if(temp<10) {
datestr+= "-0"+temp;
} else {
datestr+= "-"+temp;
}