QQBot/web/bilibili.html

81 lines
2.3 KiB
HTML

<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<title>BiliBili下载器</title>
<link rel="stylesheet" href="layui/css/layui.css">
<meta charset="utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
</head>
<body>
<div class="myDiy">
<blockquote class="layui-elem-quote">BiliBili下载器
</blockquote>
<br/><br/><br/>
<div class="layui-bg-gray layui-row layui-col-space15" id="card" style="padding: 30px;">
<form class="layui-form" action="">
<div class="layui-form-item">
<label class="layui-form-label">视频地址</label>
<div class="layui-input-block">
<input type="url" name="url" required lay-verify="required" placeholder="请输入URL" autocomplete="off" class="layui-input">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">复选框</label>
<div class="layui-input-block">
<input type="checkbox" name="danmu" title="下载弹幕" checked>
<input type="checkbox" name="merge" title="合并合集">
</div>
</div>
<div class="layui-form-item">
<div class="layui-input-block">
<button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
</div>
</div>
</form>
</div>
</div>
</body>
<script src="layui/layui.js"></script>
<script src="layui/jquery-3.2.1.js"></script>
<script>
layui.use('form', function(){
let form = layui.form;
//监听提交
form.on('submit(formDemo)', function(_data){
//layer.msg(JSON.stringify(data.field));
$.post("/bilibili/down.do",{data:JSON.stringify(_data.field)},function (json) {
layer.msg(json.msg)
})
return false;
});
});
</script>
<style>
.myDiy {
width: 40%;
height: 300px;
margin-top: 10px;
margin-left: 25%;
}
.button {
width: 100px;
height: 100px;
font-size: 1em;
}
</style>
</html>