123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130 |
- <?xml version="1.0" encoding="EUC-KR"?>
- <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.css" ?>
- <xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2002/01/xforms" xmlns:ev="http://www.w3.org/2001/xml-events">
- <xhtml:head>
- <xhtml:title>Untitle</xhtml:title>
- <model id="model1">
- <instance id="instance1">
- <root xmlns="">
- <example>Sample</example>
- <dateValue/>
- <fromData/>
- <endData/>
- <numData/>
- <strData/>
- <residentno/>
- <textareadata/>
- <weekvalue/>
- </root>
- </instance>
- </model>
- <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/stringHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/utilHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/numericHelper.js"/>
- <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
- </xhtml:head>
- <xhtml:body>
- <input id="input1" ref="/root/dateValue" inputtype="date" style="left:435px; top:40px; width:100px; height:20px; "/>
- <button id="button1" class="btn2_letter6" style="left:565px; top:40px; width:100px; height:20px; ">
- <caption>getAddDate</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var addDy = model.getValue("/root/dateValue");
-
- addDy = addDy.toDate().getAddDate(-1,"Y");
- addDy = addDy.getDateFormat();
- alert(addDy);
- ]]>
- </script>
- </button>
- <input id="input2" ref="/root/endData" inputtype="date" style="left:440px; top:75px; width:100px; height:20px; "/>
- <input id="input3" ref="/root/fromData" inputtype="date" style="left:320px; top:75px; width:100px; height:20px; "/>
- <button id="button2" class="btn2_letter8" style="left:565px; top:74px; width:100px; height:20px; ">
- <caption>getDateInterval</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var diffDate = getDateInterval(model.getValue("/root/fromData"), model.getValue("/root/endData"));
- alert(diffDate);
- ]]>
- </script>
- </button>
- <caption id="caption1" style="left:425px; top:75px; width:12px; height:20px; vertical-align:middle; ">~</caption>
- <button id="button3" class="btn2_letter10" style="left:565px; top:108px; width:130px; height:20px; ">
- <caption>getCurrentDateTime</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- alert(getCurrentDateTime());
- ]]>
- </script>
- </button>
- <button id="button4" class="btn2_letter5" style="left:565px; top:142px; width:100px; height:20px; ">
- <caption>getFullAge</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var residentno = model.getValue("/root/residentno");
-
- alert(getFullAge(residentno));
- ]]>
- </script>
- </button>
- <button id="button5" class="btn2_letter8" style="left:685px; top:75px; width:100px; height:20px; ">
- <caption>getTimeInterval</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var diffTime = getTimeInterval("11:11:22","11:11:33");
- alert(diffTime);
- ]]>
- </script>
- </button>
- <button id="button6" class="btn2_letter5" style="left:565px; top:175px; width:100px; height:20px; ">
- <caption>getRound</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var rtn = model.getValue("/root/numData");
-
- var toNum = rtn.getRound(-2, "UP");
- alert(toNum);
- ]]>
- </script>
- </button>
- <input id="input4" ref="/root/numData" roundmode="round" roundposition="2" style="left:460px; top:175px; width:100px; height:20px; ">
- <script type="javascript" ev:event="onkeyup">
- <![CDATA[
- inputEnterKey("button6");
- ]]>
- </script>
- </input>
- <button id="button7" class="btn2_letter7" style="left:565px; top:205px; width:100px; height:20px; ">
- <caption>getRightPad</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var rtnStr = model.getValue("/root/strData");
- rtnStr = rtnStr.getRightPad(10,"$");
- alert(rtnStr);
- ]]>
- </script>
- </button>
- <input id="input5" ref="/root/strData" style="left:460px; top:205px; width:100px; height:20px; "/>
- <input id="input6" ref="/root/residentno" style="left:460px; top:140px; width:100px; height:20px; "/>
- <button id="button8" class="btn2_letter5" style="left:565px; top:365px; width:100px; height:20px; ">
- <caption>isByteSize</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var str = model.getValue("/root/textareadata");
- alert(str.isByteSize(10));
- ]]>
- </script>
- </button>
- <textarea id="textarea1" ref="/root/textareadata" maxlength="50" style="left:360px; top:235px; width:200px; height:150px; "/>
- <button id="button9" class="btn2_letter8" style="left:555px; top:15px; width:108px; height:19px; ">
- <caption>getDayOfWeek</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- alert(model.getValue("/root/weekvalue").toDate().getDayOfWeek("K"));
- ]]>
- </script>
- </button>
- <input id="input7" ref="/root/weekvalue" inputtype="date" style="left:450px; top:15px; width:100px; height:20px; "/>
- </xhtml:body>
- </xhtml:html>
|