-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathURLencDecord.html
More file actions
81 lines (71 loc) · 2.56 KB
/
URLencDecord.html
File metadata and controls
81 lines (71 loc) · 2.56 KB
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
<!DOCTYPE html>
<html>
<head>
<META charset="UTF-8">
</head>
<body>
<h1> URL エンコード・デコード </h1>
<hr>
<h3>デコード </h3>
<h5>例) "%E3%82%A2"→"ア"</h5>
<pre>
上の入力欄に%混じりのURLを入力し、
「デコード」ボタンを押すと、
下の出力欄に日本語混じりのURLが表示されますので、
それをコピペして使ってください。
</pre>
<div class="decodearea">
<form id="areaB" name="areaB" action="">
<textarea id="formInputB" rows="4" cols="40"></textarea><br>
<input type="button" value="デコード" onclick="DecodeStringToUri();" />
</form>
<textarea id="decOutputB" rows="4" cols="40"></textarea><br>
</div>
<script>
<!--
function DecodeStringToUri() {
var DecStr = decodeURI( document.getElementById("formInputB").value );
document.getElementById("decOutputB").innerHTML = DecStr;
}
// -->
</script>
<hr>
<h3>エンコード</h3>
<h5>例) "ア"→"%E3%82%A2"</h5>
<pre>
上の入力欄に日本語混じりのURLを入力し、
「デコード」ボタンを押すと、
下の出力欄に%混じりのURLが表示されますので、
それをコピペして使ってください。
</pre>
<div class="encodearea">
<form id="areaA" name="areaA" action="">
<textarea id="formInputA" rows="4" cols="40"></textarea><br>
<input type="button" value="エンコード" onclick="EncodeStringToUri();" />
</form>
<textarea id="encOutputA" rows="4" cols="40"></textarea><br>
</div>
<script>
<!--
function EncodeStringToUri() {
var EncStr = encodeURI( document.getElementById("formInputA").value );
document.getElementById("encOutputA").innerHTML = EncStr;
}
// -->
</script>
<hr>
<h3> 参考 </h3>
<p>
<a href="https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Global_Objects/encodeURI">MDN Web Docs > 開発者向けのウェブ技術 > JavaScript > JavaScript リファレンス > 標準組込みオブジェクト > encodeURI()</a>
<br>
</p>
<p>
<a href="https://www.nishishi.com/javascript-tips/encodeuri.html">パーセント記号を使ったURL(URI)エンコード・デコード方法</a>
<br>
</p>
<p>
<a href="https://tech-unlimited.com/urlencode.html">TECH-UNLIMITED > URLエンコード・デコード</a>
<br>
</p>
</body>
</html>