-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdemo10.html
More file actions
51 lines (50 loc) · 1.32 KB
/
demo10.html
File metadata and controls
51 lines (50 loc) · 1.32 KB
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
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>flowJS demo10</title>
</head>
<body>
</body>
<script type="text/javascript" src="./flowJS.js"></script>
<script type="text/javascript">
flowJS({
init:function(){
console.log('执行 init');
this.setNext('步骤A').setNext('步骤B').setNext('步骤C');
this.next();
},
'步骤A':function(){
console.log('执行 步骤A');
this.next();
},
'步骤B':{
init:function(){
console.log('执行 子步骤B init');
this.setNext('子步骤B1').setNext('子步骤B2').setNext('子步骤B3');
this.next();
},
'子步骤B1':function(){
console.log('执行 子步骤B1');
this.next();
},
'子步骤B2':function(){
console.log('执行 子步骤B2');
console.log('上一步 :'+this.getPrev());
console.log('当前步 :'+this.getCurr());
console.log('下一步 :'+this.getNext());
this.next();
},
'子步骤B3':function(){
console.log('执行 子步骤B3');
this.parent.next();
}
},
'步骤C':function(){
console.log('执行 步骤C');
console.log('当前流程运行的轨迹:');
console.log(flowJS.trace);
}
});
</script>
</html>