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

          JSP表達(dá)式語言

          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)航:
           
          主站蜘蛛池模板: 甘孜县| 嘉鱼县| 怀来县| 银川市| 会宁县| 尼木县| 恭城| 安龙县| 含山县| 小金县| 衡水市| 通河县| 泰安市| 安阳县| 屯门区| 福贡县| 奇台县| 北辰区| 临西县| 武威市| 平果县| 上栗县| 亳州市| 湘西| 绵阳市| 金华市| 泊头市| 隆昌县| 安西县| 尉氏县| 香河县| 墨脱县| 绍兴县| 红河县| 全椒县| 镇远县| 堆龙德庆县| 碌曲县| 勃利县| 阳新县| 天柱县|