loading
open in
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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
<head>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>

<script src="//cdnjs.cloudflare.com/ajax/libs/list.js/1.5.0/list.min.js"></script>


<script>

  $(document).ready(function(){
    $("#filter").keyup(function(){
 
        // Retrieve the input field text and reset the count to zero
        var filter = $(this).val(), count = 0;
 
        // Loop through the comment list
        $("tbody.list td.Keyword").each(function(){
 
            // If the list item does not contain the text phrase fade it out
            if ($(this).text().search(new RegExp(filter, "i")) < 0) {
                $(this).parent().fadeOut();
 
            // Show the list item if the phrase matches and increase the count by 1
            } else {
                $(this).parent().show();
                count++;
            }
        });
 
        // Update the count
        var numberItems = count;
        $("#filter-count").text(count);
    });
});  
</script>


<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>


</head>


<div class="container">

<form id="live-search" action="" class="styled" method="post">
    <fieldset>
        <h1>Live Search</h1>
        <input type="text" class="text-input" id="filter" placeholder="Regex search" />
        <span id="filter-count"></span>
    </fieldset>
</form>

<div id="contacts" >
  <input type="text" class="search" placeholder="Common search" />

  <table class='table table-hover table-striped'>
    <thead>
      <tr>
        <th class="sort" data-sort="Keyword">名称</th>
        <th class="sort" data-sort="Min_search_volume">月間検索数(min)</th>
        <th class="sort" data-sort="Max_search_volume">月間検索数(max)</th>
        <th colspan="2">
        </th>
      </tr>
    </thead>
    <tbody class="list">
      <tr>
        <td class='Keyword'>riddle joker</td>
        <td class="Min_search_volume">10000</td>
        <td class="Max_search_volume">100000</td>
      </tr>
      <tr>
        <td class='Keyword'>11eyes</td>
        <td class="Min_search_volume">1000</td>
        <td class="Max_search_volume">10000</td>
      </tr>
      <tr>
        <td class='Keyword'>fate stay night</td>
        <td class="Min_search_volume">10000</td>
        <td class="Max_search_volume">100000</td>
      </tr>
    </tbody>
  </table>
</div>


</div>


<style>
body {
font-family:sans-serif;
}
table td, table th {
padding:5px;
}
</style>

<script type="text/javascript">
var options = {
valueNames: [ 'id', 'Keyword', 'Min_search_volume', 'Max_search_volume' ]
};

// Init list
var contactList = new List('contacts', options);

var idField = $('#id-field'),
  KeywordField = $('#Keyword-field'),
  Min_search_volumeField = $('#Min_search_volume-field'),
  Max_search_volumeField = $('#Max_search_volume-field'),
  addBtn = $('#add-btn'),
  editBtn = $('#edit-btn').hide(),
  removeBtns = $('.remove-item-btn'),
  editBtns = $('.edit-item-btn');

// Sets callbacks to the buttons in the list
refreshCallbacks();

addBtn.click(function() {
contactList.add({
  id: Math.floor(Math.random()*110000),
  Keyword: KeywordField.val(),
  Min_search_volume: Min_search_volumeField.val(),
  Max_search_volume: Max_search_volumeField.val()
});
clearFields();
refreshCallbacks();
});

editBtn.click(function() {
var item = contactList.get('id', idField.val())[0];
item.values({
  id:idField.val(),
  Keyword: KeywordField.val(),
  Min_search_volume: Min_search_volumeField.val(),
  Max_search_volume: Max_search_volumeField.val()
});
clearFields();
editBtn.hide();
addBtn.show();
});

function refreshCallbacks() {
// Needed to add new buttons to jQuery-extended object
removeBtns = $(removeBtns.selector);
editBtns = $(editBtns.selector);

removeBtns.click(function() {
  var itemId = $(this).closest('tr').find('.id').text();
  contactList.remove('id', itemId);
});

editBtns.click(function() {
  var itemId = $(this).closest('tr').find('.id').text();
  var itemValues = contactList.get('id', itemId)[0].values();
  idField.val(itemValues.id);
  KeywordField.val(itemValues.Keyword);
  Min_search_volumeField.val(itemValues.Min_search_volume);
  Max_search_volumeField.val(itemValues.Max_search_volume);

  editBtn.show();
  addBtn.hide();
});
}

function clearFields() {
KeywordField.val('');
Min_search_volumeField.val('');
Max_search_volumeField.val('');
}
</script>


<style>.frame {
  display: block;
  width: 100vw;
  height: 100vh;
  max-width: 100%;
  margin: 0;
  padding: 0;
  border: 0 none;
  box-sizing: border-box;
}</style>

<!-- <iframe src="https://114514.click/iframe/fuuminnetabout" width="100%" height="100%" frameborder="0" allowfullscreen scrolling="no"></iframe> -->
<!-- <iframe class='frame' src="https://114514.click/iframe/fuuminnetabout"></iframe> -->


<style>
  hr.style-seven {
      overflow: visible; /* For IE */
      height: 30px;
      border-style: solid;
      border-color: black;
      border-width: 1px 0 0 0;
      border-radius: 20px;
  }
  hr.style-seven:before { /* Not really supposed to work, but does */
      display: block;
      content: "";
      height: 30px;
      margin-top: -31px;
      border-style: solid;
      border-color: black;
      border-width: 0 0 1px 0;
      border-radius: 20px;
  }


</style>
result
console