Created
September 1, 2018 09:09
-
-
Save yohanes/ab56dc1b30551cff24985c465c7bc8a3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>Talk</title> | |
<script src="jquery-3.3.1.min.js"></script> | |
</head> | |
<body> | |
Say | |
<form onsubmit="return say();"> | |
<input type="text" style="font-size: 72pt; background: #eeeeee" id="t" size=30 > | |
</form> | |
<script> | |
function say() { | |
$.getJSON( "talk.php", {"t": t.value}, function( data ) { | |
new Audio('talkdata/'+encodeURIComponent(data.id)).play() | |
}); | |
return false; | |
} | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment