JBLSChecker/app/static/scripts.js
2024-09-22 18:14:36 +08:00

8 lines
352 B
JavaScript

document.getElementById('server-form').addEventListener('submit', function(e) {
const serverInput = document.getElementById('server').value;
if (!serverInput.startsWith('https://') && !serverInput.startsWith('http://')) {
e.preventDefault();
alert('Please enter a valid server URL starting with https:// or http://');
}
});