mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2024-12-26 06:57:04 +01:00
21 lines
661 B
HTML
21 lines
661 B
HTML
|
<!DOCTYPE html>
|
||
|
<html>
|
||
|
<head>
|
||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
|
||
|
</head>
|
||
|
<body>
|
||
|
<form method="post">
|
||
|
<h1>Set username:<h1>
|
||
|
<input type="text" name="username" id="username" required>
|
||
|
</form>
|
||
|
<script>
|
||
|
$("input").keypress(function(event) {
|
||
|
var content = $('#username').val();
|
||
|
if (event.which == 13 && /\S/.test(content)) {
|
||
|
event.preventDefault();
|
||
|
$("form").submit();
|
||
|
}
|
||
|
});
|
||
|
</script>
|
||
|
<body>
|
||
|
</html>
|