Very basic proof of concept, able to post and recieve messages

This commit is contained in:
Jeremy Zhang
2017-01-16 15:03:49 -08:00
parent e5c45d4c3f
commit cd9e21fa87
4 changed files with 156 additions and 0 deletions

View File

@ -0,0 +1,21 @@
<!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>