You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

78 lines
2.2 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<script src="https://static.runoob.com/assets/jquery/2.0.3/jquery.min.js"></script>
<script type="text/javascript">
function getQueryString(name) {
let reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
let r = window.location.search.substr(1).match(reg);
if (r != null) {
return decodeURIComponent(r[2]);
};
return null;
}
var ds_access_token = getQueryString("ds_access_token");
var person_id = getQueryString("person_id");
var token = getQueryString("token");
var identity_id = getQueryString("identity_id");
if(ds_access_token!=""){
document.cookie = "ds_access_token=" + ds_access_token;
}
if(person_id!=""){
document.cookie = "person_id=" + person_id;
}
if(token!=""){
document.cookie = "token=" + token;
}
if(identity_id!=""){
document.cookie = "identity_id=" + identity_id;
}
</script>
<style>
body {
font-size: 20px;
}
input {
height: 35px;
width: 400px;
}
</style>
</head>
<body>
<form action="#" method="GET">
ds_access_token<input type="text" id="ds_access_token" name="ds_access_token" value=""><br>
<!-- <script>document.write(document.cookie.split(";")[0].split("=")[1]); </script><br><br> -->
person_id<input type="text" name="person_id"><br>
<!-- <script>document.write(document.cookie.split(";")[3].split("=")[1]); </script><br><br> -->
token<input type="text" name="token"><br>
<!-- <script>document.write(document.cookie.split(";")[1].split("=")[1]); </script><br><br> -->
identity_id<input type="text" name="identity_id"><br>
<!-- <script>document.write(document.cookie.split(";")[2].split("=")[1]); </script><br><br> -->
<input type="submit" />
</form>
<script>
document.write(document.cookie)
// alert(getQueryString("ds_access_token"))
</script>
</body>
</html>