标签:
<span style="font-size:18px;"><%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <% String path = request.getContextPath(); String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <base href="<%=basePath%>"> <title>My JSP 'eloperate.jsp' starting page</title> <meta http-equiv="pragma" content="no-cache"> <meta http-equiv="cache-control" content="no-cache"> <meta http-equiv="expires" content="0"> <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"> <meta http-equiv="description" content="This is my page"> <!-- <link rel="stylesheet" type="text/css" href="styles.css"> --> <title>el运算</title> </head> <body> <table> <tr > <td> <table border="1"> <tr> <th colspan="2">四则运算:</th> </tr> <tr> <th>操作符</th> <th>操作结果</th> </tr> <tr> <td>\${1+2}</td> <td>${1+2}</td> </tr> <tr> <td>\${1-2}</td> <td>${1-2}</td> </tr> <tr> <td>\${1*2}</td> <td>${1*2}</td> </tr> <tr> <td>\${6/3}<br/>\${6 div 3}</td> <td>${6/3}<br/>${6 div 3}</td> </tr> <tr> <td>\${9%4}<br/>\${9 mod 4}</td> <td>${9%4}<br/>${9 mod 4}</td> </tr> </table> </td> <td> <table border="1"> <tr> <th colspan="2">比较运算:</th> </tr> <tr> <th>操作符</th> <th>操作结果</th> </tr> <tr> <td>\${2==1}<br/>\${2 eq 1}</td> <td>${2==1}<br/>${2 eq 1}</td> </tr> <tr> <td>\${2!=1}<br/>\${2 ne 1}</td> <td>${2!=1}<br/>${2 ne 1}</td> </tr> <tr> <td>\${2<1}<br/>\${2 lt 1}</td> <td>${2<1}<br/>${2 lt 1}</td> </tr> <tr> <td>\${2>1}<br/>\${2 gt 1}</td> <td>${2>1}<br/>${2 gt 1}</td> </tr> <tr> <td>\${2<=1}<br/>\${2 le 1}</td> <td>${2<=1}<br/>${2 le 1}</td> </tr> <tr> <td>\${2>=1}<br/>\${2 ge 1}</td> <td>${2>=1}<br/>${2 ge 1}</td> </tr> </table> </td> <td> <table border="1"> <tr> <th colspan="2">逻辑运算:</th> </tr> <tr> <th>操作符</th> <th>操作结果</th> </tr> <tr> <td>\${true&&false}<br/>\${true and false}</td> <td>${true&&false}<br/>${true and false}</td> </tr> <tr> <td>\${true||false}<br/>\${true or false}</td> <td>${true||false}<br/>${true or false}</td> </tr> <tr> <td>\${2<1}<br/>\${2 lt 1}</td> <td>${2<1}<br/>${2 lt 1}</td> </tr> <tr> <td>\${!false}<br/>\${not false}</td> <td>${!false}<br/>${not false}</td> </tr> <tr> <td>\${2<=1}<br/>\${2 le 1}</td> <td>${2<=1}<br/>${2 le 1}</td> </tr> <tr> <td>\${2>=1}<br/>\${2 ge 1}</td> <td>${2>=1}<br/>${2 ge 1}</td> </tr> </table> </td> <td> <table border="1"> <tr> <th colspan="2">特殊运算:</th> </tr> <tr> <th>操作符</th> <th>操作结果</th> </tr> <tr> <td>\${empty null }<br/>\${empty ""}<br/>\${empty 0}<br/>\${empty " "}</nr></td> <td>${empty null }<br/>${empty ""}<br/>${empty 0}<br/>${empty " "}</nr></td> </tr> <tr> <td>\${2>1?'two':'one'}</td> <td>${2>1?'two':'one'}</td> </tr> </table> </td> </tr> </table> </body> </html></span>
标签:
原文地址:http://blog.csdn.net/zhupengqq/article/details/51344017