Site Notice
hello, world
Difference between revisions of "超星弹幕助手"
From Project-EPB Commons
([InPageEdit] 没有编辑摘要) |
([InPageEdit] 没有编辑摘要) |
||
Line 1: | Line 1: | ||
{{#tag:html| | {{#tag:html| | ||
<script src="https://common.wjghj.cn/js/ChaoXingDanMuZhuShou"></script> | <script src="https://common.wjghj.cn/js/ChaoXingDanMuZhuShou"></script> | ||
− | < | + | <pre id="msgArea" style="padding: 4px; height: 200px; overflow: auto; border: 1px solid #aaa;"> |
<p class="comment">老师:同学们怎么想呢?<span style="color:#ccc">{{#time:h:i:s|+8hours}}</span> </p> | <p class="comment">老师:同学们怎么想呢?<span style="color:#ccc">{{#time:h:i:s|+8hours}}</span> </p> | ||
− | </ | + | </pre> |
<textarea id="RKLBChat_sendText"></textarea> | <textarea id="RKLBChat_sendText"></textarea> | ||
<button id="RKLBChat_sendMsg" onclick="sendComment()">发送评论</button> | <button id="RKLBChat_sendMsg" onclick="sendComment()">发送评论</button> | ||
Line 11: | Line 11: | ||
if (msg === '') return; | if (msg === '') return; | ||
$('#RKLBChat_sendText').val(''); | $('#RKLBChat_sendText').val(''); | ||
− | $('#msgArea'). | + | $('#msgArea').append('<p class="comment">您:' + msg + '<span style="color:#ccc">'+new Date().toTimeString() + '</span></p>'); |
} | } | ||
setInterval(function(){ | setInterval(function(){ | ||
var date = new Date(), | var date = new Date(), | ||
timeNow = date.toTimeString(); | timeNow = date.toTimeString(); | ||
− | $('#msgArea'). | + | $('#msgArea').append('<p class="comment">其他人:大概是……然后吧……我觉得呢……你们说呢?<span style="color:#ccc">'+ timeNow + '</span></p>'); |
},8000); | },8000); | ||
</script> | </script> | ||
}} | }} |
Revision as of 00:20, 22 February 2020
<html> <script src="https://common.wjghj.cn/js/ChaoXingDanMuZhuShou"></script> '"`UNIQ--pre-00000000-QINU`"' <textarea id="RKLBChat_sendText"></textarea> <button id="RKLBChat_sendMsg" onclick="sendComment()">发送评论</button> <script> function sendComment() {
var msg = $('#RKLBChat_sendText').val(); if (msg === '') return; $('#RKLBChat_sendText').val(''); $('#msgArea').append('<p class="comment">您:' + msg + '<span style="color:#ccc">'+new Date().toTimeString() + '</span></p>');
} setInterval(function(){
var date = new Date(), timeNow = date.toTimeString(); $('#msgArea').append('<p class="comment">其他人:大概是……然后吧……我觉得呢……你们说呢?<span style="color:#ccc">'+ timeNow + '</span></p>');
},8000); </script> </html>