Site Notice
hello, world
Difference between revisions of "超星弹幕助手"
From Project-EPB Commons
([InPageEdit] 没有编辑摘要) |
([InPageEdit] 没有编辑摘要) |
||
Line 2: | Line 2: | ||
<script src="https://common.wjghj.cn/js/ChaoXingDanMuZhuShou"></script> | <script src="https://common.wjghj.cn/js/ChaoXingDanMuZhuShou"></script> | ||
<div id="msgArea" style="padding: 4px; height: 200px; overflow: auto; border: 1px solid #aaa;"> | <div id="msgArea" style="padding: 4px; height: 200px; overflow: auto; border: 1px solid #aaa;"> | ||
− | <p class="comment"> | + | <p class="comment">老师:同学们怎么想呢?</p> |
− | |||
</div> | </div> | ||
<textarea id="RKLBChat_sendText"></textarea> | <textarea id="RKLBChat_sendText"></textarea> | ||
Line 12: | Line 11: | ||
if (msg === '') return; | if (msg === '') return; | ||
$('#RKLBChat_sendText').val(''); | $('#RKLBChat_sendText').val(''); | ||
− | $('#msgArea').prepend('<p class="comment">您:' + msg + '</p>'); | + | $('#msgArea').prepend('<p class="comment">您:' + msg + '['+new Date().getTime() + ']</p>'); |
} | } | ||
setInterval(function(){ | setInterval(function(){ | ||
− | $('#msgArea').prepend('<p class="comment">其他人:大概是……然后吧……我觉得呢……你们说呢?</p>'); | + | $('#msgArea').prepend('<p class="comment">其他人:大概是……然后吧……我觉得呢……你们说呢?['+new Date().getTime() + ']</p>'); |
},8000); | },8000); | ||
</script> | </script> | ||
</html> | </html> |
Revision as of 23:59, 21 February 2020
<html> <script src="https://common.wjghj.cn/js/ChaoXingDanMuZhuShou"></script> <div id="msgArea" style="padding: 4px; height: 200px; overflow: auto; border: 1px solid #aaa;"> <p class="comment">老师:同学们怎么想呢?</p> </div> <textarea id="RKLBChat_sendText"></textarea> <button id="RKLBChat_sendMsg" onclick="sendMsg()">发送评论</button> <script> function sendMsg() {
var msg = $('#RKLBChat_sendText').val(); if (msg === '') return; $('#RKLBChat_sendText').val(''); $('#msgArea').prepend('<p class="comment">您:' + msg + '['+new Date().getTime() + ']</p>');
} setInterval(function(){
$('#msgArea').prepend('<p class="comment">其他人:大概是……然后吧……我觉得呢……你们说呢?['+new Date().getTime() + ']</p>');
},8000); </script> </html>