custom-scripts/mccs-it/thermal/public/index.html

22 lines
623 B
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Test Print</title>
</head>
<body>
<h1>Thermal Printer Test</h1>
<button id="testPrintBtn">Test Print</button>
<script>
document.getElementById('testPrintBtn').addEventListener('click', () => {
fetch('/test-print', { method: 'POST' })
.then(response => response.json())
.then(data => alert(data.message))
.catch(error => alert('Error: ' + error));
});
</script>
</body>
</html>