ctrl+enter to send message
This commit is contained in:
parent
6f3df5fc51
commit
489f6b223c
@ -7,11 +7,16 @@
|
||||
</ul>
|
||||
</div>
|
||||
<div class="fixed-bottom form-inline">
|
||||
<textarea id="msgbox" class="form-control" style="width:85%; float: left; margin-bottom: 20px;" placeholder="说点什么吧"></textarea>
|
||||
<textarea id="msgbox"
|
||||
class="form-control"
|
||||
style="width:85%;
|
||||
float: left;
|
||||
margin-bottom: 20px"
|
||||
placeholder="说点什么吧"></textarea>
|
||||
<button id="btn-send"
|
||||
class="btn btn-info"
|
||||
type="button"
|
||||
style="width: 10%;"
|
||||
style="width: 10%"
|
||||
onclick="send_message()"
|
||||
disabled>
|
||||
<svg xmlns="http://www.w3.org/2000/svg"
|
||||
@ -37,8 +42,14 @@
|
||||
btn_send.disabled = true;
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<script>
|
||||
|
||||
var textarea = document.getElementById("msgbox")
|
||||
textarea.addEventListener('keydown', function(e) {
|
||||
if (e.ctrlKey && e.keyCode == 13) {
|
||||
send_message()
|
||||
}
|
||||
});
|
||||
|
||||
function get_history() {
|
||||
var msgs
|
||||
$.ajax({
|
||||
|
Reference in New Issue
Block a user