-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrmre.html
50 lines (48 loc) · 1.64 KB
/
rmre.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
<!DOCTYPE html>
<html lang="zh">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<title>文本去重复工具</title>
<link href="https://cdn.bootcss.com/twitter-bootstrap/4.1.3/css/bootstrap.min.css" rel="stylesheet">
<script type="text/javascript">
function sx() {
var rntArray = [],
temp, hasValue;
var array = document.getElementById("neirong").value.split("\n");
for (var i in array) {
temp = array[i];
hasValue = false;
for (var j in rntArray) {
if (temp === rntArray[j]) {
hasValue = true;
break;
}
}
if (hasValue === false) {
rntArray.push(temp);
}
}
document.getElementById("neirong1").value = rntArray.join("\n");
}
</script>
</head>
<body>
<div class="container">
<div class="row clearfix">
<div class="col-md-12 column">
<h3 class="text-center"> 文本去重复工具 </h3>
<div class="row clearfix">
<div class="col-md-6 column">
<p> <textarea name="neirong" id="neirong" type="text" style="WIDTH: 100%; HEIGHT: 600px;overflow:auto;"
cols="440" rows="1">这里输入</textarea> </p>
</div>
<div class="col-md-6 column">
<p> <textarea name="neirong1" id="neirong1" type="text" style="WIDTH: 100%; HEIGHT: 600px; overflow:auto;"
cols="440" rows="1"></textarea> </p>
</div>
</div> <button type="button" class="btn btn-default btn-block" onclick="return sx();">去除重复</button>
</div>
</div>
</div>
</html>