新建文件

This commit is contained in:
2025-01-06 19:52:30 +08:00
commit 4d2d5e2d5e
32 changed files with 1177 additions and 0 deletions

50
setup.html Normal file
View File

@ -0,0 +1,50 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>操作表</title>
<!-- 确保 jQuery 库正确加载 -->
<script src="http://125.64.9.222:8022/public_libs/jquery.js"></script>
<script>
// 确保在文档加载完成后执行
$(document).ready(function(operation, table) {
function query(operation, table) {
$.ajax({
url: "/setup.php",
type: "POST",
data: {
operation: operation,
table: table
}
}).done((res) => {
console.log(res)
// 检查并使用返回的JSON数据
$("#result").html(res);
}).fail((jqXHR, textStatus, errorThrown) => {
$('#result').html('Request failed: ' + textStatus);
});
}
// 按钮点击事件绑定
$('button').click(function() {
const operation = $(this).attr('data-operation');
const table = $('#mySelect').val()
query(operation, table);
});
});
</script>
</head>
<body>
<button data-operation="del">drop table</button>
<button data-operation="create">create table</button>
<button data-operation="select">select table</button>
<select id="mySelect">
<option value="user_70">user_70</option>
<option value="nucleic_acid_test_2">nucleic_acid_test_2</option>
<option value="patient_90">patient_90</option>
</select>
<button onclick="location.reload();">refresh</button>
<div id="result" style="border: 1px solid; margin-top:15px; margin-left: 20px; margin-right: 100px; padding: 50px">
</div>
</body>
</html>