posts - 189,comments - 115,trackbacks - 0



http://www.disound.com/zblog/rss.asp?cate=3


<?xml version="1.0" encoding="UTF-8" ?>
<canvas>
 <script>
  function checkIt(){
   if(canvas.input.inputname.name.getText()==""){
    canvas.input.checkView.setText("姓名不能为空")
    return 0;
    
   }
   else{
    return 1;
   }

  }
 </script>
 <simplelayout axis="x" spacing="30"/>
 <view name="input" x="30" y="30"   width="50%" height="100%">
  <simplelayout axis="y" spacing="10"/>
  <view  name="inputname" x="10">
   <simplelayout axis="x" spacing="10"/>
   <text>请输入姓名</text>
   <edittext name="name"></edittext>
  </view>
  <view  name="inputpassword" x="10">
   <simplelayout axis="x" spacing="10"/>
   <text>请输入密码</text>
   <edittext name="password" password="true"></edittext>
  </view> 
  <view name="inputage" x="10">
   <simplelayout axis="x" spacing="10"/>
   <text>请输入年龄</text>
   <edittext name="age" pattern="[1,2,3,4,5,6,7,8,9,0]*" ></edittext>
  </view> 
  <view name="inputsex" x="10">
   <simplelayout axis="x" spacing="10"/>
   <text>请输入性别</text>
    <combobox  name="sex" editable="false" defaulttext="请选择">
       <textlistitem text="男" />
       <textlistitem text="女" />
     </combobox>
  </view> 
  <view name="inputmail" x="10">
   <simplelayout axis="x" spacing="10"/>
   <text>请输入E-Mail</text>
   <edittext name="mail"></edittext>
  </view> 
  <button isdefault="true">
   重置
   <method event="onclick">
    parent.inputname.name.setText("");
    parent.inputpassword.password.setText("");
    parent.inputage.age.setText("");
    parent.inputsex.sex.setText("请选择");
    parent.inputmail.mail.setText("");
   </method>
  </button>
  <button isdefault="true">
   提交
   <method event="onclick">
    if(!checkIt()){}
    else{
     if(canvas.look.dataView.getText != ""){
      canvas.look.dataView.clearText();
     }
     canvas.look.dataView.addText("姓  名:" + parent.inputname.name.getText()+"\n");
     canvas.look.dataView.addText("年  龄:" + parent.inputage.age.getText()+"\n");
     canvas.look.dataView.addText("性  别:" + parent.inputsex.sex.getText()+"\n");
     canvas.look.dataView.addText("E-Mail:" + parent.inputmail.mail.getText()+"\n");
    }
   </method>
  </button>
  <text name="checkView" multiline="true" maxlength="1000"/>
 </view>
 <view name="look" y="30" width="50%" height="100%">
  
  <text name="dataView" multiline="true" maxlength="1000">


  </text>
 </view>
</canvas>


http://www.openria.cn/posts/list/38.page


http://www.wujianrong.com/archives/2007/02/laszlo.html

http://www.onjava.com/pub/a/onjava/2005/06/15/laszlo.html

http://blog.csdn.net/xray_gu


http://www.xml.com/pub/a/2006/10/11/introducing-open-laszlo.html?page=2
posted on 2007-04-19 15:22 MEYE 阅读(419) 评论(0)  编辑  收藏

只有注册用户登录后才能发表评论。


网站导航: