EL里取整?
RT,如何在EL里取整?
怎么样使value为整数?
Java code
<input type="text" id="a" name="a" value="${a/1000}">
------解决方案--------------------
<%@ page language="java" contentType="text/html; charset=utf-8"
pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>
</head>
<body>
<c:set var="a" value="12345"></c:set>
<input type="text" id="a" name="a" value='${fn:substringBefore((a/1000+0.5), ".") }'>
</body>
</html>