Files
2-BeiqiFutian-MES_Manage/webpage/ExcelDemo.html
2026-05-29 13:44:19 +08:00

69 lines
2.3 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<meta charset="utf-8" />
<script src="../JS/jquery-3.2.1.min.js"></script>
<script type="text/javascript">
function btnTest() {
var param = '{"type":"' + $("#TYPE").val() + '","name":"' + $("#NAME").val() + '","param":"'+ $("#PARAM1value").val() + '"}'
console.log(param)
$.ajax({
url: $("#URL").val(),
type: 'POST',
contentType: "application/json; charset=utf-8",
dataType: 'json',
data: param,
success: function (data) {
$("#testResult").val(JSON.stringify(data));
},
error: function (data) {
$("#testResult").val('error');
}
});
}
</script>
<style>
.td{
width:400px;
}
input{
width:100%;
}
</style>
</head>
<body>
<table style="width:600px;">
<tr>
<td>URL:</td>
<td class=".td"><input id="URL" type="text" value="../submit/MESDownloadExcel.ashx" /></td>
</tr>
<tr>
<td>TYPE:</td>
<td class=".td"><input id="TYPE" type="text" />(11 查询 12 增删改)</td>
</tr>
<tr>
<td>NAME:</td>
<td class=".td"><input id="NAME" type="text" />(存储过程名称)</td>
</tr>
<tr>
<td>PARAM: </td>
<td class=".td"><input id="PARAM1value" type="text" value=""/>(存储过程参数)</td>
<h>PARAM示例[{\"name\":\"检测点代码\",\"value\":15},{\"name\":\"原材料_check\",\"value\":1},{\"name\":\"原材料代码\",\"value\":12}]</h>
</tr>
<tr>
<td>Pagination: </td>
<td class=".td"><input id="Pagination" type="text" />(分页的参数)</td>
</tr>
<tr>
<td><input type="button" onclick="btnTest()" value="testBtn" /></td>
</tr>
<tr style="height:400px;">
<td style="height:100%;" colspan="2">返回数据:<textarea id="testResult" style="width:100%;height:90%;" rows="30" cols="20"></textarea></td>
</tr>
</table>
</body>
</html>