API网址: http://docs.sencha.com/touch/2.4/2.4.2-apidocs/
引入:
sencha-touch.css
sencha-touch-all.js
两个文件。
写第一个程序【Hello sencha Touch】。
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; minimum-scale=1.0; user-scalable=0;" />
<title>Hello Sencha Touch</title>
<link rel="stylesheet" href="sencha-touch.css" type="text/css">
<script type="text/javascript" src="sencha-touch-all.js"></script>
<script type="text/javascript">
var App = new Ext.application({ //利用框架的Application类的构造函数构造一个应用
name: 'myApp', //为这个应用指定名称
useLoadMask: true,
launch: function () { //这是程序的入口
Ext.Msg.confirm( "Hello Sencha Touch", "请选择", function(buttonId){
//显示一个弹出窗口
Ext.Msg.alert('您选择的是', buttonId);
});
}
});
</script>
</head>
<body>
</body>
</html>