-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path23_messagebox.html
70 lines (62 loc) · 1.8 KB
/
23_messagebox.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<!DOCTYPE html>
<html>
<head>
<meta charset="euc-kr">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no" />
<title>Sencha Touch</title>
<link rel="shortcut icon" href="../image/icon.png">
<link rel="apple-touch-icon" href="../image/icon.png">
<link rel="stylesheet" type="text/css" href="./sdk/resources/css/sencha-touch.css">
<script type="text/javascript" src="./sdk/sencha-touch.js"></script>
<script type="text/javascript">
Ext.Loader.setConfig({ enabled: true });
Ext.application({
name: "MyApp",
launch: function() {
var btnAlert = Ext.create("Ext.Button", {
text:"Alert",
ui:"confirm",
handler:function() {
Ext.Msg.alert("알림", "로그인되었습니다.", Ext.emptyFn);
}
});
var btnConfirm = Ext.create("Ext.Button", {
text:"Confirm",
ui:"confirm",
handler:function() {
Ext.Msg.confirm("확인", "정말 전송하시겠습니까?", function(buttonId){
console.log(buttonId);
if(buttonId =="yes") {
console.log("예를 눌렀군요");
} else {
console.log("아니오를 눌렀군요");
}
});
}
});
var btnPrompt = Ext.create("Ext.Button", {
text:"Prompt",
ui:"confirm",
handler:function() {
Ext.Msg.prompt("입력", "이름을 입력하세요:", function(buttonId, value) {
if(buttonId =="ok") {
console.log("입력한내용: " + value);
}
});
}
});
var toolbar = Ext.create("Ext.Toolbar", {
docked: "top",
items: [ btnAlert, btnConfirm, btnPrompt ]
});
var rootPanel = Ext.create("Ext.Panel", {
items: [ toolbar ]
});
Ext.Viewport.add(rootPanel);
}
});
</script>
</head>
<body>
</body>
</html>