posts - 3, comments - 0, trackbacks - 0, articles - 0

          JSP表達(dá)式語(yǔ)言

          Posted on 2006-06-15 21:21 clingingboy 閱讀(270) 評(píng)論(0)  編輯  收藏 所屬分類: JSP基礎(chǔ)
          ?看其本身自帶的例子

          1,
          EL ExpressionResult
          ${1}1
          ${1 + 2}3
          ${1.2 + 2.3}3.5
          ${1.2E4 + 1.4}12001.4
          ${-4 - 2}-6
          ${21 * 2}42
          ${3/4}0.75
          ${3 div 4}0.75
          ${3/0}Infinity
          ${10%4}2
          ${10 mod 4}2
          ${(1==2) ? 3 : 4}4

          2,
          EL ExpressionResult
          ${1 < 2}true
          ${1 lt 2}true
          ${1 > (4/2)}false
          ${1 > (4/2)}false
          ${4.0 >= 3}true
          ${4.0 ge 3}true
          ${4 <= 3}false
          ${4 le 3}false
          ${100.0 == 100}true
          ${100.0 eq 100}true
          ${(10*10) != 100}false
          ${(10*10) ne 100}false

          3,
          EL ExpressionResult
          ${'a' < 'b'}true
          ${'hip' > 'hit'}false
          ${'4' > 3}true

          4,
          EL ExpressionResult
          ${param.foo}bar?
          ${param["foo"]}bar?
          ${header["host"]}127.0.0.1:8080
          ${header["accept"]}*/*
          ${header["user-agent"]}Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Maxthon; .NET CLR 2.0.50727)

          5,
          EL ExpressionResult
          ${param["foo"]}0.2 ?
          ${my:reverse(param["foo"])}2.0?
          ${my:reverse(my:reverse(param["foo"]))}0.2 ?
          ${my:countVowels(param["foo"])}0?

          只有注冊(cè)用戶登錄后才能發(fā)表評(píng)論。


          網(wǎng)站導(dǎo)航:
           
          主站蜘蛛池模板: 建德市| 台湾省| 丘北县| 正宁县| 阿鲁科尔沁旗| 枣强县| 上饶县| 东乌| 溧阳市| 舟山市| 福清市| 贺兰县| 兰州市| 象州县| 灵川县| 固始县| 诏安县| 乐亭县| 南部县| 普宁市| 耒阳市| 东阿县| 济阳县| 宣武区| 彝良县| 靖宇县| 巴彦淖尔市| 阿图什市| 略阳县| 武乡县| 边坝县| 保定市| 上蔡县| 德令哈市| 霍山县| 伊川县| 阳新县| 柘城县| 泾源县| 伊吾县| 华坪县|