-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
134 lines (131 loc) · 4.64 KB
/
index.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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<meta name = "viewport" content = "width = device-width">
<meta name = "viewport" content = "initial-scale = 1.0">
<meta name = "viewport" content = "height = device-height">
<meta name = "viewport" content = "maximum-scale=1.0">
<meta name = "viewport" content = "user-scalable=no">
<meta name = "viewport" content = "user-scalable=no">
<meta content="telephone=no" name="format-detection" />
<link type="text/css" rel="stylesheet" href="css/main.css">
<link type="text/css" rel="stylesheet" href="fonts/demo.css">
<link type="text/css" rel="stylesheet" href="fonts/iconfont.css">
<title>每日记账</title>
</head>
<body>
<header id="index-header">
<div class="nav-box">
<ul class="nav-list">
<li><a href="#">账目列表</a></li>
<li><a href="#">账目统计</a></li>
<li><a href="#">账目图表</a></li>
</ul>
<div class="head-nav-left">
<i class="iconfont"></i>
</div>
<div class="head-text">
<h4>记账本</h4>
</div>
<div class="head-wirte">
<i class="iconfont"></i>
</div>
</div>
</header>
<main class="index-main">
<div id="content">
<ul>
<li class="box-con">
<div class="theBox">
<div class="box-icon">
<i class="iconfont "></i>
</div>
<div class="box-text">
<h4>收入</h4>
</div>
<div class="box-money">
<input value="+ 8888" type="text" disabled="disabled">
</div>
<div class="box-time">
<p>2015/7/22</p>
</div>
<div class="box-change">
<div class="box-change-write">
<i class="iconfont"></i>
</div>
<div class="box-change-del">
<i class="iconfont"></i>
</div>
</div>
</div>
</li>
<li class="box-con">
<div class="theBox">
<div class="box-icon">
<i class="iconfont"></i>
</div>
<div class="box-text">
<h4>收入</h4>
</div>
<div class="box-money">
<input value="+ 8888" type="text" disabled="disabled">
</div>
<div class="box-time">
<p>2015/7/22</p>
</div>
<div class="box-change">
<div class="box-change-write">
<i class="iconfont"></i>
</div>
<div class="box-change-del">
<i class="iconfont"></i>
</div>
</div>
</div>
</li>
</ul>
</div>
</main>
<script charset="gb2312" src="js/main.js"></script>
<script src="jq/jquery-2.1.4.min.js"></script>
<script>
function addEvent(obj,type,fn){
if(document.addEventListener){
obj.addEventListener(type,fn,false)
}
}
function removeEvent(obj,type,fn){
if(document.removeEventListener){
obj.removeEventListener(type,fn,false)
}
}
/* 删除节点操作 开始 */
var del=document.getElementsByClassName("box-change-del");
var del_thisLi={
touchStart:function(e){
e.preventDefault();
if(this.parentNode.parentNode.parentNode.remove){
if(confirm("确定要删除吗")){//删除确认
this.parentNode.parentNode.parentNode.remove();
this.addEventListener('touchend',del_thisLi.touchEnd,false);
e.stopPropagation()
}else{
return false
}
}
e.stopPropagation()
},
touchEnd:function(e){
e.preventDefault();
removeEvent(this,'touchstart',del_thisLi.touchStart)
e.stopPropagation()
}
};
for(var i=0;i<del.length;i++){
del[i].addEventListener('touchstart',del_thisLi.touchStart,false)
}
/* 删除节点操作 结束 */
</script>
</body>
</html>