Skip to content

Instantly share code, notes, and snippets.

View satbirdd's full-sized avatar

liu lei satbirdd

  • Changsha, China
View GitHub Profile
// do_sync();
// do_async();
// async_mode();
// function: setTimeout
// sync
function do_sync() {
@satbirdd
satbirdd / gist:6945775
Last active December 25, 2015 08:19
sendmessage
var index = 1;
function sendMessage() {
var room_name = "中华网军事战略群";
var message = "这是我发送的第 [" + index + "] 条信息";
index ++;
$("#room-" + room_name).val(message);
setTimeout(function(){
$("#room-" + room_name).trigger("input");
$("button[type=submit]").click();
}, 0);