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

📄 passport.js

📁 具有的功能适合于网站的运营和管理
💻 JS
📖 第 1 页 / 共 2 页
字号:
   {
      alert("请填入Rss链接地址");
      return;
   }
   var name=$("RssName").value;
   if(name=="")
   {
     alert("请填入标签名称");
     return;
   }
   xmlhttp=GetAjaxObject();
   xmlhttp.onreadystatechange=function()
   {   
     if(xmlhttp.readystate==4&&xmlhttp.status==200)
     {
        parasefeed();
     }    
   }
   var submitURL=ServiceUrl+"?Action=AddRss&RssUrl="+url+"&RssName="+escape(name)+"&Rnd="+Math.random();
   xmlhttp.open('GET',submitURL,true);
   xmlhttp.send(null);
}
function ClearRssList()
{
  $("MyRssList").innerHTML="";
}
function GetRsslist()
{  
   xmlhttp="";
   xmlhttp=GetAjaxObject();
   xmlhttp.onreadystatechange=function()
  {
     if(xmlhttp.readystate==4 && xmlhttp.status==200)
     {      
        ParseRsslist();
     }
  }
   var submitURL=ServiceUrl+"?Action=GetMyRssList&RND="+Math.random();  
   xmlhttp.open('GET',submitURL,true);
   xmlhttp.send(null);
}

function hidedescription(){
  divobj.style.display="none";  
}
//显示隐藏Rss
function showhide(objID)
{
   var obj=$(objID);
   obj.style.display=obj.style.display=="none"?"":"none";
}

function ParseRsslist()
{
  var xmlDoc=xmlhttp.responseXML;
      var news=xmlDoc.getElementsByTagName("item");
      var url=[];
      var name=[];
      var id=$("MyRssList");
     
      for(var i=0;i<news.length;i++)
      {
         url[i]=news[i].getElementsByTagName("url")[0].firstChild.nodeValue;//获取RSS链接
         name[i]=news[i].getElementsByTagName("name")[0].firstChild.nodeValue;//获取RSS名称 
         var liTag=document.createElement("Li")   
         var aTag=document.createElement("A");
         var txt=document.createTextNode(name[i]);
         aTag.appendChild(txt);  
         aTag.href="javascript:GetRss('"+url[i]+"','content')";  
       
         liTag.appendChild(aTag)
         insertAt(id,liTag,0);
       }    
 
}
function parasefeed()
{
   var xmlDoc=xmlhttp.responseXML;
   var url=xmlDoc.getElementsByTagName("url")[0].firstChild.nodeValue;//获取RSS链接
   var name=xmlDoc.getElementsByTagName("name")[0].firstChild.nodeValue;//获取RSS名称  
   var id=document.getElementById("MyRssList");
   var liTag=document.createElement("Li")   
   var aTag=document.createElement("A");
   var txt=document.createTextNode(name);
   aTag.appendChild(txt);
   aTag.href="javascript:GetRss('"+url+"','content')"; 
   liTag.appendChild(aTag)
   insertAt(id, liTag,0)
  
}
//插入结点
function insertAt(parentNode,newNode,index)
{
  if(!parentNode.hasChildNodes())
  {
     parentNode.appendChild(newNode);
     return newNode;
   }
   try
   {
      parentNode.insertBefore(newNode,parentNode.childNodes[index]);      
   }
   catch(e)
   {
      return null;
      
   }
   return newNode;
}

function deleteAt(parentNode,index)
{
  if(parentNode.hasChildNodes())
  {
    try
    {
       parentNode.removeChild(parentNode.childNodes[index]);
    }
    catch(e)
    {
       return null;
    }
  }
}
function showDel()
{ 
  var menuobj=$("menu");
  menuobj.style.display="";
 // menuobj.style.left=event.x;
 // menuobj.style.top=event.y;
  //menuobj.innerHTML="<a href=javascript:void(0) onclick=deleteAt("+obj+","+index+")"
} 
function getCookie(cookieName)
{
    var cookieString = document.cookie
    var first ,last
    first=cookieString.indexOf(cookieName)
    if(first!=-1)
    {
       first+=(cookieName.length+1)
       last=cookieString.indexOf(';',first)
       return unescape(cookieString.substring(first,last));
    }
    return null;
    
}


function GoSearch()
{
   var searchKey=$("WebSearch").value
   if(searchKey==""||searchKey==null)
   { 
      window.alert("搜索内容不能为空");
      return false;
   }   
   if($("Google").checked)
      var arr=showModalDialog('http://www.google.com/search?hl=zh-CN&inlang=zh-CN&ie=GB2312&oe=GB2312&q='+searchKey,'','dialogWidth:800px; dialogHeight:600px; help: yes; scroll: yes; status: no;');
   if(document.getElementById("Baidu").checked)
      var arr=showModalDialog('http://www1.baidu.com/baidu?tn=verywind&word='+searchKey,'','dialogWidth:800px; dialogHeight:600px; help: yes; scroll: yes; status: no;');
   if(document.getElementById("Yahoo").checked)
      var arr=showModalDialog('http://www.yahoo.com.cn/search?p='+searchKey,'','dialogWidth:800px; dialogHeight:600px; help: yes; scroll: yes; status: no;');
   return false;
}
function ShowTopLoginSuccess()
{
  $("toolbar_login").style.display="none";
  $("toolbar_welcome").style.display="";
  var text= $("toolbar_welcome").innerHTML;
  if(text=="")
  {
     $("toolbar_welcome").innerHTML="欢迎:<b style='color:red;font-size:13px'>"+getCookie("Howave_UcodeUserName")+"</b>&nbsp;&nbsp;<a href='Logout.aspx'>注销</a>&nbsp;&nbsp;<a href='javascript:void(0)' onclick='return initContent(\"ManageSiteMessage.aspx\",\"短消息\")'>短消息</a>";
  }
}
function ShowLoginSuccess()
{
	   $("showlogin").style.display="none";
       $("showloginsuccess").style.display="";
       var text= $("welocme").innerHTML;
       if(text=="")
       {
          text="欢迎:";
          $("welocme").innerHTML=text+getCookie("Howave_UcodeUserName")+"</br><div style='text-align:center'>&nbsp;&nbsp;欢迎光临!您已成功登录!</div>";
       }
       GetRsslist();
}
function ShowDefaultHide()
{   
if($('leftmenu') != null)
{
	if($('leftmenu').style.display == 'none')
	{
		$('leftmenu').style.display='inline';
		$('sideBar2').style.display='inline';
	}
	if($('leftarea') != null)
	{
	   $('leftmenu').innerHTML = $('leftarea').innerHTML;	 
	   $('leftarea').innerHTML = '';
	}
}
}
function GetAnnounce()
{
  
   var Announcehttp=GetAjaxObject(); 
   var submitURL=ServiceUrl+"?Action=GetAnnounce";  
   Announcehttp.open('GET',submitURL,true); 
 
   Announcehttp.onreadystatechange=function()
   {
     if(Announcehttp.readystate==4)
     {   
        if(Announcehttp.status==200)
        {
      
        var xmlDoc=Announcehttp.responseXML;
        var news=xmlDoc.getElementsByTagName("item");
        var url=[];
        var name=[];
        var id=$("MyAnnounce");
     
          for(var i=0;i<news.length;i++)
          {
             url[i]=news[i].getElementsByTagName("url")[0].firstChild.nodeValue;//获取RSS链接
             name[i]=news[i].getElementsByTagName("name")[0].firstChild.nodeValue;//获取RSS名称 
             var liTag=document.createElement("Li")   
             var aTag=document.createElement("A");
             var txt=document.createTextNode(name[i]);
             aTag.appendChild(txt);
             aTag.href=url[i]+"&TypeSelect=Announce"; 
             aTag.target="_blank";
             liTag.appendChild(aTag)
             insertAt(id,liTag,0);
          }  
        }    
     }
   }
  
   Announcehttp.send(null);

}
function chkemail(a)
{	var i=a.length;
	var temp = a.indexOf('@');
	var all = a.substring(temp);
	var tempd = all.indexOf('.')+temp;
	if (temp > 1) {
	  return 1;
	}
	return 0;
}
function ChangeStyle(color)
{
  switch(color)
  {
    case "red":
      $("toolbar").style.backgroundImage="url(Images/dialog/toolbar_red_bg.gif)";     
      break;
    case "blue":
      $("toolbar").style.backgroundImage="url(Images/dialog/toolbar_blue_bg.gif)";     
      break;
    case "green":
      $("toolbar").style.backgroundImage="url(Images/dialog/toolbar_green_bg.gif)";     
      break;
    case "orange":
      $("toolbar").style.backgroundImage="url(Images/dialog/toolbar_orange_bg.gif)";     
      break;
    default:
      $("toolbar").style.backgroundImage="url(Images/dialog/toolbar_bg.gif)";     
      break;     
  }
  SetCookie("toolbarBg",color,30);
}
function SetCookie(name,value,days) {
	if (days) {
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
	alert(value);
	alert(name);
}
function showToolbar()
{
  var toolbarObj=$("toolbar");
  toolbarObj.style.display="";
}
var fix=0;
function fixToolbar(fixed)
{
  if(fixed==1)
  {
    fix=1;
    $("toolbar").style.position="relative";
    oheight = document.body.clientHeight;
    nowheight = oheight-32;
    $("howave_main_frame").style.height=(nowheight/oheight*100)+"%";
  }
  else if(fixed==0)
  {
   fix=0;
   $("toolbar").style.position="absolute";
   $("howave_main_frame").style.height="100%";
  }
  if(fix==0)
  {
    $("toolbar").style.display="none";   
  }
  else
  {
    $("toolbar").style.display="";   
  }
}
function ShowTime()
{
  var d = new Date();
  var vHour = d.getHours();
  var vMin = d.getMinutes();
  var vSec = d.getSeconds();  
  $("time").innerHTML=vHour+":"+vMin+":"+vSec;
  setTimeout("test()",1000);
}
function Active()
{
  parent.ActivePage.location="Index.aspx";
  setTimeout("Active()",300000);//1000表示1秒,表示5分钟从后台激活一次asp.net,这里时间随你系统的配置而更改。主要是保持页面不用重新加载
}    
function RssSet(id,Settype)
{
  var rssobj= $(id)
  switch (Settype)
  {
     case "min":
       rssobj.style.display="none";
       break;
     case "max":
       rssobj.style.display="block";
       break;
     case "close":
       rssobj.style.display="none";
       break;
  }

}

⌨️ 快捷键说明

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