?? showtopic.js
字號:
?function validate(theform) {
if (theform.title.value == "" || theform.message.value == "") {
alert("請完成標題和內容欄。");
return false;
}
else if (theform.title.value.length > 80) {
alert("您的標題超過 80 個字符的限制。");
theform.title.focus();
return false;
}
if (!disablepostctrl && ((postminchars != 0 && theform.message.value.length < postminchars) || (postmaxchars != 0 && theform.message.value.length > postmaxchars))) {
alert("您的帖子長度不符合要求。\n\n當前長度: "+theform.message.value.length+" 字節\n系統限制: "+postminchars+" 到 "+postmaxchars+" 字節");
return false;
}
theform.replysubmit.disabled = true;
return true;
}
function ShowFormatBytesStr(bytes)
{
if(bytes > 1073741824)
{
document.write((Math.round((bytes/1073741824)*100)/100).toString()+' G');
}
else if(bytes > 1048576)
{
document.write((Math.round((bytes/1048576)*100)/100).toString()+' M');
}
else if(bytes > 1024)
{
document.write((Math.round((bytes/1024)*100)/100).toString()+' K');
}
else
{
document.write(bytes.toString()+' Bytes');
}
}
function ShowStars(n, t) {
var s = '';
for(var i=3; i>0; i--) {
level = parseInt(n / Math.pow(t, i-1));
n = n % Math.pow(t, i-1);
for(var j=0; j<level; j++) {
s += '<img src="templates/' + templatepath + '/images/star_level'+i+'.gif" />';
}
}
document.write(s);
}
function imgzoom(o)
{
if(event.ctrlKey)
{
var zoom = parseInt(o.style.zoom, 10) || 100;
zoom -= event.wheelDelta / 12;
if(zoom > 0)
{
o.style.zoom = zoom + '%';
}
return false;
}
else
{
return true;
}
}
function printinpostad(index){
try{
if (inpostad){
document.writeln("<table width=\"100%\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" style=\"\">");
document.writeln("<tr>");
document.writeln(" <td class=\"line category\" style=\"padding: 5px\">");
document.writeln(" [廣告]" + inpostad[index]);
document.writeln(" </td>");
document.writeln("</tr>");
document.writeln("</table>");
}
}
catch(e){
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -