⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 showtopic.js

📁 基于Windows平台的ASP.net框架
💻 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 + -