Skip to content

Instantly share code, notes, and snippets.

@yohanes yohanes/talk.html
Created Sep 1, 2018

Embed
What would you like to do?
<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
You can’t perform that action at this time.