-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsteemitapi97.html
37 lines (37 loc) · 982 Bytes
/
steemitapi97.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
<!DOCTYPE html>
<html>
<head>
<script src="https://code.jquery.com/jquery-latest.js"></script>
<style>
body {font-size:12px;}
table {border: 1px solid #AAA; border-left: 0; border-collapse: separate; border-spacing: 0;}
th, td {border-left: 1px solid #AAA;}
td {border-top: 1px solid #AAA;}
th {border-top: 0;}
</style>
</head>
<body>
<div id="support"></p>
<script>
var props = [];
var table = '';
/* $.supportのプロパティを取得 */
$.each($.support, function(key, value){
props.push({key:key, value:value});
});
/* 取得したプロパティをアルファベット順にソート */
props.sort(function(a, b){
return a.key > b.key ? 1 : -1;
});
/* テーブルにして出力 */
$.each(props, function(){
table += '<tr>';
table += '<td>' + this.key + '</td>';
table += '<td>' + this.value + '</td>';
table += '</tr>';
});
table = '<table>' + '<th>キー</th><th>値</th>' + table + '</table>'
$('#support').append(table);
</script>
</body>
</html>