📄 cndevforum.js
字号:
//论坛转移
function goto_forum(obj,idx)
{
var location,sel_val;
sel_val = obj.options[idx].value;
if(sel_val>0)
{
location='subject_list.asp?forum_id='+sel_val;
// window.alert(location);
window.location=location;
}
if(sel_val<-1)
{
sel_val =-1*sel_val - 1000;
location='class_list.asp?class_id='+sel_val;
// window.alert(location);
window.location=location;
}
return false;
}
/// 论坛列表采用下拉菜单 2004/05/10,只针对IE浏览器
var cur_obj;
function openRootMenu(o)
{
var sobj,fobj,cmd;
eval("sobj="+o+".style;");
if(sobj.visibility != "visible")
{
sobj.visibility="visible";
sobj.zIndex=3;
}
cur_obj = o;
}
function closeRootMenu(o)
{
var cmd
cmd = "rootMenuCheck('"+o+"')";
cur_obj=null;
window.setTimeout(cmd,200);
}
function rootMenuCheck(o)
{
var sobj;
if(o != cur_obj)
{
eval("sobj="+o+".style;");
sobj.visibility="hidden";
}
}
/// 论坛列表采用下拉菜单
//'打印表情符号列表 2003/08/20 闻怡洋修改为通过本地VBScript显示
function ReplaceFaceList(span_obj,img_url,cur_sel)
{
var i,faceStr,glo_face_image_url;
glo_face_image_url=img_url;
faceStr = "";
for (i=1 ;i<= 33;i++)
{
faceStr= faceStr+ "<input type=\"radio\" name=\"face\" value=\"" +i + "\" ";
if(i == cur_sel)
faceStr= faceStr+ " checked";
faceStr= faceStr+ "><img src="+glo_face_image_url + i+".gif > ";
}
span_obj.innerHTML = faceStr;
}
//功能:显示回复情况,回复者,日期
function printLastReplyInfo_local_js( reply_user, reply_nickname, last_time, reply_type)
{
var m_date,m_time;
if (reply_nickname != "" )
{
if( reply_user =="") //未登录用户回复
document.write (reply_nickname );
else //登录用户回复
document.write("<a href=\"#\" onClick='openUserWindow(\"user_view.asp?user_name="+ reply_user +"\");return false;' title=\"查看"+ reply_user +"个人信息\">"+ reply_nickname +"</a>");
}
//m_date = FormatDateTime(last_time,2)
//m_date = Right(m_date,Len(m_date)-2)
//m_time = FormatDateTime(last_time,4)
m_date = last_time.substr(2);
m_time = m_date.substring(0,m_date.lastIndexOf(":"));
window.document.write(" "+ m_time);
}
function ResizeFaceImage2(obj)
{
ResizeFaceImage3(obj)
}
function ResizeAttachImage2(obj)
{
ResizeAttachImage3(obj)
}
//头像调整功能 V3
function ResizeFaceImage3(obj)
{//调整头像
if ( obj.width>128 )
{
obj.width=128;
}
if ( obj.height >150 )
{
obj.height =150;
}
}
//调整附件图片 V3
function ResizeAttachImage3(obj)
{
if ( obj.width>768 )
{
obj.width=768;
}
if ( obj.height>2048 )
{
obj.height=2048;
}
}
//如果用户按下了ctrl键,并且在图片上滚动wheel,则对图像进行缩放
function zoomImg(e, o)
{
if(e.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 HandleReplyQuote(obj2,title)
{//引用的文字显示到回复框中
var iText = obj2.innerText,re,oldText;
oldText = speak_reply_form.content.innerText;
//re = "/\s+/gim";
//iText = iText.replace(re," ");
if(iText.length>200)
{
iText = iText.substr(0,200);
iText += "...... . . . . . . . . . . . .\n";
}
while(iText.search("\n") != -1)
{
iText = iText.replace("\n"," ");
}
while(iText.search("\r") != -1)
{
iText = iText.replace("\r"," ");
}
iText = iText.replace("\r"," ");
iText = "<BLOCKQUOTE>引用“"+ title + "”所言\n<Q>"+ iText +"</Q></BLOCKQUOTE>\n";
speak_reply_form.content.innerText = iText+oldText;
speak_reply_form.with_html.checked=true;
return false;
}
function openNewWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
function openUserWindow(theURL)
{
openNewWindow(theURL,'','')
}
function openUserWindow2(theURL)
{
openNewWindow(theURL,'用户资料','scrollbars=yes,resizable=NO,width=660,height=400')
}
function openSendMail(theURL)
{
openNewWindow(theURL,'发送邮件','scrollbars=yes,resizable=NO,width=660,height=400')
}
function openMessageWindow(theURL)
{
openNewWindow(theURL,'留言','scrollbars=yes,resizable=NO,width=660,height=350')
}
function openDeleteWindow(theURL)
{
openNewWindow(theURL,'删除主题','scrollbars=yes,resizable=NO,width=660,height=400')
}
function openBulletinWindow(theURL)
{
openNewWindow(theURL,'论坛公告','scrollbars=yes,resizable=NO,width=660,height=300')
}
function openImageWindow(theURL)
{
openNewWindow(theURL,'头像列表','scrollbars=yes,resizable=NO,width=660,height=350')
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -