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

📄 detail.js

📁 asp 学习电子书电子书 asp 学习电子书电子书
💻 JS
字号:
//bbs 帖子页脚本函数2006-2-16 zhangcy
var img_src='';
function show_image(){
    var num1=document.reply_form.first_num.value;
    var num2=document.reply_form.second_num.value;
    var num3=document.reply_form.third_num.value;
    var num=num1+num2+num3;
    if('000'==num){
        document.getElementById('face_to_insert').innerHTML='';
        img_src='';
    }else{
        img_src='http://icon.zol.com.cn/bbs/index2/faces/'+num+'.gif';
        document.getElementById('face_to_insert').innerHTML="<img id='face_to_show' src=''>";
        document.getElementById('face_to_show').src=img_src;
    }
    document.reply_form.content.focus();
}

function use_mine(itemid){
    if(!itemid){
        return;
    }
    var dir=Math.ceil(itemid/1000);
    img_src='http://img.zol.com.cn/bbs/little/l_'+dir+'/'+itemid+'.gif';
    document.getElementById('face_to_insert').innerHTML="<img id='face_to_show' src=''>";
    document.getElementById('face_to_show').src=img_src;
}

function message(userid,messageid){
    var   tr;
    tr = 'http://v1.bbs.zol.com.cn/user/send_msg.php?userid=' + userid+'&messageid='+messageid;
    window.open(tr,'message','width=420,height=230');
}

function CopyRssUrl(url){
    if(!url){
        return;
    }
    window.clipboardData.setData('Text',url);
    alert('Rss地址已复制到剪贴版');
}

function add_hexun(){
    t=document.title;
    u=location.href;
    e=document.selection?(document.selection.type!='None'?document.selection.createRange().text:''):(document.getSelection?document.getSelection():'');
    void(open('http://bookmark.hexun.com/post.aspx?title='+escape(t)+'&url='+escape(u)+'&excerpt='+escape(e),'HexunBookmark','scrollbars=no,width=600,height=450,left=80,top=80,status=no,resizable=yes'));
   document.getElementById('hexun_bookmark').src='http://v1.bbs.zol.com.cn/tips/hexun_bookmark.php'; 
}

function ckform(obj){
    if(0==obj.content.value.length){
        alert('内容不能空啊!');
        obj.content.focus();
        return false;
    }

    if(img_src){
        ToAdd = " [IMG]"+img_src+"[/IMG]";
        obj.content.value += ToAdd;
    }
    obj.submit_data.value='正在提交..';
    obj.submit_data.disabled=true;
    return true;
}
        
function reply_this(nickname,userid,level,headpic){
    document.location = '#top_reply';
    var info_str='<img src="http://bbs.zol.com.cn/new/images/little/3189.gif" alt="">对&nbsp;';
    if(level){
        info_str+='第'+level+'楼';
    }else{
        info_str+='楼主';
    }
    info_str+='&nbsp;'+nickname+'&nbsp;<img src="'+headpic+'" alt="">&nbsp;说:';
    document.reply_form.reply_info.value=info_str;
    document.reply_form.reply_to_userid.value=userid;
    document.reply_form.content.focus();
}

function ctlent(eventobject){
    if(event.ctrlKey && window.event.keyCode==13){
        document.reply_form.submit();
        document.reply_form.submit_data.disabled=true;
    }
}
function setsuper(tr){
    str = '['+ tr +']' + document.reply_form.content.value + '[/'+ tr +']';
    document.reply_form.content.value = str;
}
function onsize(){
     ToAdd = '[size='+document.reply_form.fbsize.value+']' + document.reply_form.content.value + '[/size]';
     document.reply_form.content.value = ToAdd;
}
function readCookie(name){
  var cookieValue = '';
  var search = name + '=';
  if(document.cookie.length > 0)
  { 
    offset = document.cookie.indexOf(search);
    if (offset != -1)
    { 
      offset += search.length;
      end = document.cookie.indexOf(';', offset);
      if (end == -1) end = document.cookie.length;
      cookieValue = unescape(document.cookie.substring(offset, end))
    }
  }
  return cookieValue;
}

function writeCookie(name, value, hours){
  var expire = '';
  if(hours != null)
  {
    expire = new Date((new Date()).getTime() + hours * 3600000);
    expire = '; expires=' + expire.toGMTString();
  }
  document.cookie = name + '=' + escape(value) + expire;
}	

function Cimage(){
    var enterURL   = prompt("请输入图片网址", "http://");
    if (enterURL){
      ToAdd = " [URL=http://v1.bbs.zol.com.cn/tips/show_linkpic.php?piclink="+enterURL+"][IMG]"+enterURL+"[/IMG][/URL]";
    }
    document.reply_form.content.value += ToAdd;
}

function Cswf(){		
     var enterSIZE   = prompt("输入Flash尺寸(宽,高)!", "WIDTH=300 HEIGHT=250");
     var enterURL   = prompt("请输入Flash网址", "http://");
     if (enterURL)
     {		 
            ToAdd = "[FLASH]"+enterURL+" "+enterSIZE+"[/FLASH]";			
     }
     document.reply_form.content.value += ToAdd;
}

function Curl(){
     var FoundErrors = '';
     var enterURL   = prompt("输入链接网址!", "http://");
     var enterTxT   = prompt("输入链接说明!", "说明");
     if (!enterURL)
     {
          FoundErrors += "\n" + "链接网址不能为空";
     }
     if (!enterTxT)
     {
          FoundErrors += "\n" + "链接说明不能为空";
     }
     if (FoundErrors)
     {
          alert("错误!"+FoundErrors);
          return;
     }
     str = "[URL="+enterURL+"]"+enterTxT;
     document.reply_form.content.value += str;
     document.reply_form.content.value += "[/URL]";
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -