码迷,mamicode.com
首页 > Web开发 > 详细

我的第一个HTML5应用

时间:2015-06-04 15:55:03      阅读:132      评论:0      收藏:0      [点我收藏+]

标签:

直接贴代码:

源码:

<?xml version="1.0" encoding="UTF-8"?>


<div xmlns="http://www.w3.org/1999/xhtml" xid="window" class="window" component="$UI/system/components/justep/window/window" design="device:mobile">  
  <div component="$UI/system/components/justep/model/model" xid="model"/> 
  <!-- 绑定可监控对象 -->
  <input bind-textinput="name"></input>
  <!-- name有值就显示output,否则隐藏 text绑定了表达式 -->
  <output bind-visible="name" bind-text="‘hello,‘+name.get()+‘!‘"></output>
</div>


JS:

define(function(require){
var $ = require("jquery");
var justep = require("$UI/system/lib/justep");

var Model = function(){
this.callParent();
//定义可监控对象
this.name=justep.Bind.observable("");
};


return Model;
});

我的第一个HTML5应用

标签:

原文地址:http://blog.csdn.net/songjunyan/article/details/46359983

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!