Created
April 24, 2016 07:06
-
-
Save hendrahc/032edaa998c546a1d1990e87b28ccdc5 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> | |
<script src="https://code.jquery.com/jquery-2.2.3.min.js"></script> | |
<script src="https://cdn.socket.io/socket.io-1.2.1.js"></script> | |
<script> | |
$(function(){ | |
var socket = io.connect('http://10.10.104.191:3000'); | |
$('#mainan').on('input change',function(){ | |
socket.emit('changePrice',$(this).val()); | |
}); | |
$('#sendprice').on('click',function(){ | |
socket.emit('changePrice',$('#inputtext').val()); | |
}); | |
}); | |
</script> | |
</head> | |
<body> | |
<br><br> | |
<h1>Input Text</h1> | |
<input id="inputtext" type="text" value="" /> | |
<input id="sendprice" type="button" value="Submit" /> | |
<h1>Silakan tulis semaunya</h1> | |
<input id="mainan" type="text" value="" /> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment