You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
659 B
25 lines
659 B
5 years ago
|
<html>
|
||
|
<head>
|
||
|
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||
|
<script src="webdice.js"></script>
|
||
|
<script>
|
||
|
function send(){
|
||
|
var input = document.getElementById('inputBox').value;
|
||
|
var size = lengthBytesUTF8(input) + 1;
|
||
|
var pointer = _malloc(size);
|
||
|
stringToUTF8(input,pointer,size);
|
||
|
_webdice(pointer);
|
||
|
_free(pointer);
|
||
|
inputBox.value = '';
|
||
|
}
|
||
|
</script>
|
||
|
</head>
|
||
|
<body>
|
||
|
<div id="output"></div>
|
||
|
<form action="javascript:void(0);">
|
||
|
<input type="text" id="inputBox" onkeydown="if (event.keyCode == 13) send()">
|
||
|
<input type="button" onclick="send()" value="Submit">
|
||
|
</form>
|
||
|
</body>
|
||
|
</html>
|