工作中常用的copy总结

tech2022-09-20  109

url: "${ctx}/TbArticle/reptile"+'?name='+name+"&url="+url, 1个参数的: onclick="detail(\'' + data[i].id + '\')" 3个参数的: onclick='btnModify(\"" + row.studentNo+"\",\""+row.score+"\",\""+row.studentNam + "\")' a标签后面拼接: <a href="${ctx}/act/task/dangerForm?dangerCkRecordId=${dangerDealRecord.dangerCkRecordId}&dangerDealId=${dangerDealRecord.dangerDealId}">治理记录</a>

2.绝对路径 ${pageContext.request.contextPath}

${pageContext.request.contextPath}是JSP取得绝对路径的方法,等价于<%=request.getContextPath()%> 。 也就是取出部署的应用程序名或者是当前的项目名称。 比如我的项目名称是demo1在浏览器中输入为http://localhost:8080/demo1/a.jsp ${pageContext.request.contextPath}或 <%=request.getContextPath()%>取出来的就是/demo1,而"/"代表的含义就是 http://localhost:8080 故有时候项目中这样写 ${pageContext.request.contextPath}/a.jsp

3.在js中获取后台model传过来的值

var ctx = "${ctx}";

4.oracle相比较于mysql不区分大小写

java中的的日期格式为:

yyyy-MM-dd HH:mm:ss:代表将时间转换为24小时制,例: 2018-06-27 15:24:21 yyyy-MM-dd hh:mm:ss:代表将时间转换为12小时制,例: 2018-06-27 03:24:21

oracle中的日期格式为:(因为不区分大小写)

yyyy-MM-dd HH24:mi:ss和 yyyy-MM-dd HH:mi:ss,分别代表oracle中的24小时制和12小时制 Example example = new Example(OpShipVoyageDay.class); example.createCriteria().andEqualTo("opShipVoyageDayId",opShipVoyageDayId); example.createCriteria().andIn("opShipVoyageDayId",delids); example.setOrderByClause("vesselname_en asc,departure_dte desc");

 

最新回复(0)