Bag標籤之校正,bag標籤

來源:互聯網
上載者:User

Bag標籤之校正,bag標籤

校正輸入的內容是不是正確(校正整數、小數、字母、漢字或日文、使用者名稱、XML節點名、日期、郵件及自訂)

用法:

<Bagid=書包名 act=verify>

<wename=key [type=double(或float)|int|letter|cn(jp)|name|XmlName|date|mail] [verify=value]>value</we>

</Bag>

例:

<html><title>校正:確認內容是不是整數等</title><h3>校正:確認內容是不是整數等</h3><chtml><bagid=pPage act=verify><we name=isint type=int>124078</we><we name=isdb type=double>1240.78</we><we name=isletter type=letter>c_name</we><wename=iscn type=cn>漢字或日文</we><we name=isname type=name>test_user</we><we name=isxn type=XmlName>rootnode</we><we name=isdate type=date>2015-1-1</we><we name=ismail type=mail>admin1@htok.net</we><we name=ishex verify=0123456789abcdefABCDEF>FC00</we></bag><ifx=”@{pPage:isint}” else=1><p x=true><b>124078 </b>是<b>int</b>類型</p><p><b>124078 </b>不是<b>int</b>類型</p></if><ifx=”@{pPage:isdb}” else=1><p x=true><b>1240.78 </b>是<b>double</b>類型</p><p><b>1240.78 </b>不是<b>double</b>類型</p></if><ifx=”@{pPage:isletter}” else=1><p x=true><b>c_name</b>是<b>字母letter</b></p><p><b>c_name</b>不是<b>字母letter</b></p></if><ifx=”@{pPage:iscn}” else=1><p x=true><b>漢字或日文</b>是<b>漢字或日文cn</b></p><p><b>漢字或日文</b>不是<b>漢字或日文cn</b></p></if><ifx=”@{pPage:isname}” else=1><p x=true><b>test_user</b>可以<b>用作使用者名稱</b></p><p><b>test_user</b>不可以<b>用作使用者名稱</b></p></if><ifx=”@{pPage:isxn}” else=1><p x=true><b>rootnode</b>可以<b>用作Xml節點名</b></p><p><b>rootnode</b>不可以<b>用作Xml節點名</b></p></if><ifx=”@{pPage:isdate}” else=1><p x=true><b>2015-1-1</b>是<b>date</b>類型</p><p><b>2015-1-1</b>不是<b>date</b>類型</p></if><ifx=”@{pPage:ismail}” else=1><p x=true><b>admin1@htok.net</b>是<b>合法的email地址</b></p><p><b>admin1@htok.net</b>不是<b>合法的email地址</b></p></if><ifx=”@{pPage:ishex}” else=1><p x=true><b>FC00</b>是<b>十六進位數(0123456789abcdefABCDEF)</b></p><p><b>FC00</b>不是<b>十六進位數(0123456789abcdefABCDEF)</b></p></if></chtml></html>

輸出結果:


(例子檔案:_samples/verify.html)

簡單又全面,趕快試試吧

輕開平台資源下載及說明

平台及最新開發手冊免費下載:http://download.csdn.net/detail/tx18/8464425

開發執行個體:輕開B2C電子商務網站,免費下載:http://download.csdn.net/detail/tx18/8318585

輕開平台會不定期升級為大家提供更多強大而Easy的功能,請留意下載最新的版本


聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.