测试界面
function caonibaba(){ setInterval(function(){ var today=new Date();
$("[name='message']").val("/me现在是"+today); $("[name='post']").submit();},300000);
} function caoniba(){
var today=new Date();
var s = today.getHours();
if (s>=4 && s<10) {
var times = "/me早上好";
} else if (s>=10 && s<13) {
var times = "/me中午好";
}
else if (s>=13 && s<18) {
var times="/me下午好";
} else {
var times="/me晚上好";
}
$("[name='message']").val(times); $("[name='post']").submit();
}
var listen3 = $('#talks');
listen3.bind('DOMNodeInserted', function () {
if ($("div#talks>:first-child").attr("class") == "talk join system") { caoniba();
}
if ($("#talks > dl:nth-child(1):first-child").attr("class") == "talk san-2x") { caonibaba(); var today=new Date(); $("[name='message']").val("/me现在是"+today); $("[name='post']").submit();
}
});