-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest1.html
More file actions
29 lines (27 loc) · 871 Bytes
/
test1.html
File metadata and controls
29 lines (27 loc) · 871 Bytes
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
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=shift_jis">
<title>パラメータ取得テスト</title>
<script type="text/javascript">
function getURLParameters(){
var tmp=location.search;
if(tmp!=""){
tmp=tmp.substring(1,tmp.length);
var tmp2=tmp.split("&");
for(i in tmp2){
var key=decodeURIComponent(tmp2[i].split("=")[0]);
var val=decodeURIComponent(tmp2[i].split("=")[1]);
alert("変数: "+key+" 値: "+val);
}
}
}
function moveToTest2(){
window.open("test2.html","_self");
}
</script>
</head>
<body onload="getURLParameters();">
<input type="button" value="テスト2へ" onclick="moveToTest2();">
</body>
</html>