-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathalert.html
128 lines (106 loc) · 2.47 KB
/
alert.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>alertConfirm</title>
<link href="css/alertBox.css" rel = "stylesheet" type="text/css"/>
</head>
<style>
</style>
<body>
<table width="100%" cellspacing="0" cellpadding="0" border="0" class="tableList" id="orderList">
<tbody>
<tr>
<th>
<div>日期</div>
</th>
<th>
<div>币种</div>
</th>
<th>
<div>通知金额</div>
</th>
<th>
<div>实际到账金额</div>
</th>
<th>
<div>状态</div>
</th>
</tr>
<tr>
<th>
<div>2015/05/12</div>
</th>
<th>
<div>港币</div>
</th>
<th>
<div>11.00</div>
</th>
<th>
<div></div>
</th>
<th>
<div>
<span class="green">处理中</span>
<a href="javascript:;" class="cancel" id="alerBtn" tabindex = "1">撤回</a>
</div>
</th>
</tr>
</tbody>
</table>
<!-- <div class="alertConfirm" id="alertConfirm">
<div class="mask"></div>
<div class="dialog borderRadius">
<h3>温馨提示:</h3>
<div class="dialogContent">
<p>
<i></i>
<span class="borderRadius">确定要继续吗?</span>
</p>
</div>
<div class="dialogfooter">
<a href="javascript:;" class="borderRadius">取消</a>
<a href="javascript:;" class="borderRadius">确定</a>
</div>
<a class="dialogClose" title="关闭"></a>
<div>
<div> -->
<script src="js/alertBox.js"></script>
<script>
(function(){
'use strict';
var tableList = document.getElementById('orderList');
var trList = tableList.getElementsByTagName('tr');
var processContent = tableList.getElementsByTagName('span')[0];
var cancelBtn = document.getElementById('alerBtn');
// 高亮显示
for(var i=0;i<trList.length;i++){
trList[i].addEventListener('mouseover',function(){
this.className = 'highLight';
},false);
trList[i].addEventListener('mouseout',function(){
this.className = '';
},false);
}
var cancelBtn = document.getElementById('alerBtn');
cancelBtn.addEventListener('click',cancelBtnEvent,false);
function cancelBtnEvent(){
var My_AlertBox01 = new My_AlertBox('确定要继续吗?',function(){
var My_AlertBox02 = new My_AlertBox('撤回后不能返回',function(){
processContent.innerHTML='';
cancelBtn.innerHTML = '已撤回';
if(cancelBtn.innerHTML == '已撤回'){
cancelBtn.removeEventListener('click',cancelBtnEvent,false);
}
});
My_AlertBox02.alertConfirm();
});
My_AlertBox01.alertConfirm();
}
})();
</script>
</body>
</html>
</body>
</html>