我的第一个HTML5应用
2015-06-04 13:51
691 查看
直接贴代码:
源码:
<?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;
});
源码:
<?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 SVG聊天框拖拽弹性摇摆动画特效
- HTML5调用电脑摄像头拍照
- [HTML5]重识Html5
- [HTML5]重识Html5
- 受网友欢迎的HTML5资料(珍藏版)
- HTML5 调用手机摄像头 Demo
- HTML5+ 学习笔记3 storage.增删改查
- HTML5上的LocalStorage基本用法
- 8个WEB前端创意HTML5动画应用精选
- h5播放音乐
- HTML5Ssec.org中文版
- HTML5学习笔记 音频
- 开发者必须知道的HTML5十五大新特性
- HTML5 新的 Input 类型
- 如何让Dreamweaver CS5支持Html5
- 读过的书
- html5横、竖屏状态 以及禁止横屏
- Html5 读取csv文件(包含其他文件)
- HTML5
- HTML5学习笔记3 内联SVG