session and cookie examples

This commit is contained in:
King Wang
2021-06-11 17:46:26 +08:00
parent 69dd082dc8
commit 5af32e67ba
33 changed files with 975 additions and 0 deletions

View File

@@ -0,0 +1,46 @@
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
text-align: center;
}
body>* {
margin: 20px auto;
}
.buttons {
width: 450px;
font-size: 0px;
}
.buttons>button {
display: inline-block;
font-size: 16px;
margin: 10px;
padding: 20px;
width: calc(50% - 20px);
background: #3178c6;
color: #fff;
cursor: pointer;
border-radius: 4px;
border: none;
}
.buttons>button:hover {
background: #5ea8e9;
}
pre {
background: #333;
width: 450px;
padding: 20px;
min-height: 100px;
font-size: 14px;
color: #fff;
text-align: left;
border-radius: 4px;
}

View File

@@ -0,0 +1,29 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>TSRPC Example</title>
<link rel="stylesheet" href="index.css" />
</head>
<body>
<h1>Session and Cookie</h1>
<div class="buttons">
<button id="btnTest">Test</button>
<button id="btnClear">Clear</button>
<button id="btnGetSession">Get Session</button>
<button id="btnGetCookie">Get Cookie</button>
</div>
<h2>API Request</h2>
<pre class="apiReq"></pre>
<h2>API Return</h2>
<pre class="apiReturn"></pre>
</body>
</html>