login test
This commit is contained in:
+1
-1
@@ -18,7 +18,7 @@
|
||||
|
||||
<link href="static_fs/css/style.css" rel="stylesheet">
|
||||
|
||||
<script src="js/function.js"></script>
|
||||
<script src="js/function.js?v=1"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
+4
-4
@@ -50,8 +50,8 @@ function Post_Html(url,send)
|
||||
{
|
||||
var request = new XMLHttpRequest();
|
||||
request.open("post", url,false);
|
||||
httpRequest.setRequestHeader("Content-type","application/x-www-form-urlencoded");//设置请求头 注:post方式必须设置请求头(在建立连接后设置请求头)
|
||||
//httpRequest.send('name=teswe&ee=ef');//发送请求 将情头体写在send中
|
||||
request.setRequestHeader("Content-type","application/x-www-form-urlencoded");//设置请求头 注:post方式必须设置请求头(在建立连接后设置请求头)
|
||||
//request.send('name=teswe&ee=ef');//发送请求 将情头体写在send中
|
||||
request.send(send);
|
||||
if(request.status==200)
|
||||
{
|
||||
@@ -69,9 +69,9 @@ function Post_Html(url,send)
|
||||
|
||||
}
|
||||
//获取json
|
||||
function Get_Json(url)
|
||||
function Get_Json(html)
|
||||
{
|
||||
var html = Get_Html(url);
|
||||
|
||||
if (html!="") {
|
||||
var json = JSON.parse(html);
|
||||
//Printf(json);
|
||||
|
||||
+5
-4
@@ -4,8 +4,8 @@
|
||||
<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>sv7dgas78iref</title>
|
||||
<script src="js/function.js"></script>
|
||||
<title>testttttttt</title>
|
||||
<script src="js/function.js?v=1"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -14,7 +14,8 @@
|
||||
|
||||
<script>
|
||||
Printf("login test");
|
||||
var rt=Get_Html("http://ark.boxz.dev/api/club_signin/");
|
||||
Printf(rt);
|
||||
var rt=Post_Html("https://ark.boxz.dev/api/club_signin/","account=test&password=12345");
|
||||
var jss=Get_Json(rt);
|
||||
Printf(jss);
|
||||
|
||||
</script>
|
||||
Reference in New Issue
Block a user