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

📄 ks_refreshcommonjscls.asp

📁 SK信息采集2.0功能介绍: 1.可针对任何静态网页,动态网页进行采集。包括htm,html,shtml,ASP,ASPX,JSP,PHP等。 2.增加自定文件采集.用户可采集网页中的所有文件.
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<%
'===================================================================================================================
'软件名称:科汛网站管理系统
'当前版本:科汛网站管理系统 V2.2 Free
'Copyright (C) 2006-2008 Kesion.Com  All rights reserved.
'产品咨询QQ:9537636,41904294
'技术支持QQ:111394 
'程序版权: 科汛网络
'E-Mail  :kesioncms@hotmail.com webmaster@kesion.com
'官方网站:http://www.kesion.com  
'演示站点:http://test.kesion.com 
'郑重声明:
'    ①、免费版本请在程序首页保留版权信息,并做上本站LOGO友情连接,商业版本无此要求;
'    ②、任何个人或组织不得在授权允许的情况下删除、修改、拷贝本软件及其他副本上一切关于版权的信息;
'    ③、科汛网络保留此软件的法律追究权利
'====================================================================================================================
'-----------------------------------------------------------------------------------------------
'科汛网站管理系统,通用常用脚本特效刷新类
'开发:林文仲 版本 V 2.2
'-----------------------------------------------------------------------------------------------
Class RefreshCommonJSCls
        Private KSCMS
		Private HtmlLabel,Param			
		Private KSLabel
		Private Sub Class_Initialize()
		  Set KSCMS=New CommonCls
		  Set KSLabel=New LabelCls
		End Sub
        Private Sub Class_Terminate()
		  Set KSCMS=Nothing
		  Set KSLabel=Nothing
		End Sub
		Function ReplaceAllJS(Content)
		      Content=Replace(Content,"{$JS_Time1}",GetTime(1))
		      Content=Replace(Content,"{$JS_Time2}",GetTime(2))
			  Content=Replace(Content,"{$JS_Time3}",GetTime(3))
			  Content=Replace(Content,"{$JS_Time4}",GetTime(4))
			  Content=Replace(Content,"{$JS_Language}","<script src=""" &KSCMS.GetDomain &"inc/language.js"" language=""javascript""></script>") 
			  Content=Replace(Content,"{$JS_Collection}","<a href=""javascript:window.external.addFavorite('" &KSCMS.GetDomain& "','" & KSCMS.GetConfig("WebName") &"');"">加入收藏</a>") 
			  Content=Replace(Content,"{$JS_HomePage}","<a onclick=""this.style.behavior='url(#default#homepage)';this.setHomePage('" &KSCMS.GetDomain&"');"" href=""#"">设为首页</a>") 
			  Content=Replace(Content,"{$JS_ContactWebMaster}","<a href=""mailto:" & KSCMS.GetConfig("WebMasterEmail") & """>联系站长</a>")
			  Content=Replace(Content,"{$JS_GoBack}","<a href=""javascript:history.back(-1)"">返回上一页</a>")
			  Content=Replace(Content,"{$JS_WindowClose}","<a href=""javascript:window.close();"">关闭窗口</a>")
			  Content=Replace(Content,"{$JS_NoIframe}","<Script LANGUAGE=""JavaScript"">if(self!=top){top.location=self.location;}</script>")
			  Content=Replace(Content,"{$JS_NoSave}","<NOSCRIPT><IFRAME SRC=*.html></IFRAME></NOSCRIPT>")
			  Content=Replace(Content,"{$JS_NoCopy}","<script language=""JavaScript"">" &vbcrlf & "document.oncontextmenu=new Function(""event.returnValue=false;"");"  &vbcrlf & "document.onselectstart=new Function(""event.returnValue=false;"");</script>")
			  Content=Replace(Content,"{$JS_DCRoll}","<script language""javascript"">" & vbcrlf & "var currentpos,timer; " & vbcrlf & "function initialize() " & vbcrlf & "{ timer=setInterval(""scrollwindow()"",30);" & vbcrlf & "} " & vbcrlf & "function sc(){clearInterval(timer); " & vbcrlf & "}" & vbcrlf & "function scrollwindow() " & vbcrlf & "{currentpos=document.body.scrollTop; " & vbcrlf & "window.scroll(0,++currentpos); " & vbcrlf & "if (currentpos != document.body.scrollTop) " & vbcrlf & "sc();} " & vbcrlf & "document.onmousedown=sc" & vbcrlf & "document.ondblclick=initialize" &vbcrlf &"</script>")
			  
			   '替换对联广告(带参数)
			  If InStr(Content, "{=JS_Ad") <> 0 Then
				 '若发现,则进行替换,先取得普通函数标签的参数
				 HtmlLabel = KSLabel.GetFunctionLabel(Content, "{=JS_Ad")
				 Param = KSLabel.GetFunctionLabelParam(HtmlLabel, "{=JS_Ad")
				 Content = Replace(Content, HtmlLabel,Ads(Split(Param, ",")(0),Split(Param,",")(1),Split(Param,",")(2),Split(Param,",")(3)))
			   End If
			  
			 '替换状态栏目打字效果(带参数)
			  If InStr(Content, "{=JS_Status1") <> 0 Then
				 '若发现,则进行替换,先取得普通函数标签的参数
				 HtmlLabel = KSLabel.GetFunctionLabel(Content, "{=JS_Status1")
				 Param = KSLabel.GetFunctionLabelParam(HtmlLabel, "{=JS_Status1")
				 Content = Replace(Content, HtmlLabel,Status1(Split(Param, ",")(0),Split(Param,",")(1)))
			   End If
			 
			 '替换文字在状态栏上从右往左循环显示(带参数)
			  If InStr(Content, "{=JS_Status2") <> 0 Then
				 '若发现,则进行替换,先取得普通函数标签的参数
				 HtmlLabel = KSLabel.GetFunctionLabel(Content, "{=JS_Status2")
					 Param = KSLabel.GetFunctionLabelParam(HtmlLabel, "{=JS_Status2")
					 Content = Replace(Content, HtmlLabel,Status2(Split(Param, ",")(0),Split(Param,",")(1)))
		
			   End If
			   
			   '替换文字在状态栏上打字之后移动消失(带参数)
			  If InStr(Content, "{=JS_Status3") <> 0 Then
				 '若发现,则进行替换,先取得普通函数标签的参数
				 HtmlLabel = KSLabel.GetFunctionLabel(Content, "{=JS_Status3")
				 Param = KSLabel.GetFunctionLabelParam(HtmlLabel, "{=JS_Status3")
				 Content = Replace(Content, HtmlLabel,Status3(Split(Param, ",")(0),Split(Param,",")(1)))
			   End If

			  
			  ReplaceAllJS=Content
		End Function
		
		'日期1
		Function GetTime(Style)
		   Select Case Style
				Case 1
				GetTime="<script language=""JavaScript"">"   &vbcrlf        
				GetTime=GetTime &"	today=new Date();" & vbcrlf
				GetTime=GetTime &"	function initArray(){  " &vbcrlf                   
				GetTime=GetTime &"	this.length=initArray.arguments.length"&vbcrlf
				GetTime=GetTime &"	for(var i=0;i<this.length;i++)"   &vbcrlf          
				GetTime=GetTime &"	this[i+1]=initArray.arguments[i]  }" &vbcrlf                                          
				GetTime=GetTime &"	document.write("      &vbcrlf              
				GetTime=GetTime &"	""<font style='font-size:9pt'> "","&vbcrlf
				GetTime=GetTime &"	today.getYear(),""年"", "    &vbcrlf                 
				GetTime=GetTime &"	today.getMonth()+1,""月"","&vbcrlf
				GetTime=GetTime &"	today.getDate(),""日"","&vbcrlf
				GetTime=GetTime &"	""</font>"");"&vbcrlf
				GetTime=GetTime &"	 </script>"&vbcrlf
			Case 2
				GetTime="<script language=""JavaScript"">" &vbcrlf    
				GetTime=GetTime &"<!--" &vbcrlf
				GetTime=GetTime &"tmpDate = new Date();" &vbcrlf
				GetTime=GetTime &"date = tmpDate.getDate();" &vbcrlf
				GetTime=GetTime &"month= tmpDate.getMonth() + 1 ;" &vbcrlf
				GetTime=GetTime &"year= tmpDate.getYear();" &vbcrlf
				GetTime=GetTime &"document.write(year);" &vbcrlf
				GetTime=GetTime &"document.write(""年"");" &vbcrlf
				GetTime=GetTime &"document.write(month);" &vbcrlf
				GetTime=GetTime &"document.write(""月"");" &vbcrlf
				GetTime=GetTime &"document.write(date);" &vbcrlf
				GetTime=GetTime &"document.write(""日 "");" &vbcrlf
				
				GetTime=GetTime &"myArray=new Array(6);" &vbcrlf
				GetTime=GetTime &"myArray[0]=""星期日""" &vbcrlf
				GetTime=GetTime &"myArray[1]=""星期一""" &vbcrlf
				GetTime=GetTime &"myArray[2]=""星期二""" &vbcrlf
				GetTime=GetTime &"myArray[3]=""星期三""" &vbcrlf
				GetTime=GetTime &"myArray[4]=""星期四""" &vbcrlf
				GetTime=GetTime &"myArray[5]=""星期五""" &vbcrlf
				GetTime=GetTime &"myArray[6]=""星期六""" &vbcrlf
				GetTime=GetTime &"weekday=tmpDate.getDay();" &vbcrlf
				GetTime=GetTime &"if (weekday==0 | weekday==6)" &vbcrlf
				GetTime=GetTime &"{" &vbcrlf
				GetTime=GetTime &"document.write(myArray[weekday])" &vbcrlf
				GetTime=GetTime &"}" &vbcrlf
				GetTime=GetTime &"else" &vbcrlf
				GetTime=GetTime &"{document.write(myArray[weekday])" &vbcrlf
				GetTime=GetTime &"};" &vbcrlf
				GetTime=GetTime &"// -->" &vbcrlf
				GetTime=GetTime &"</script> " &vbcrlf
		   Case 3
		       GetTime="<script src=""" & KSCMS.GetDomain & "Inc/Date.JS"" language=""javascript""></script>"
		   Case 4
		       GetTime="<div id=""kstime""></div><script>setInterval(""kstime.innerHTML=new Date().toLocaleString()+' 星期'+'日一二三四五六'.charAt (new Date().getDay());"",1000);</script>"
			End Select
		End Function
		
		'状态栏打字特效
		Function Status1(Text,Speed)
		  Status1="<script language=""JavaScript"">" & vbcrlf
		  Status1=Status1 &"var msg = """ & Text & """ ;" & vbcrlf
          Status1=Status1 &"var interval = " & Speed & vbcrlf
          Status1=Status1 &"var spacelen = 120;" & vbcrlf
          Status1=Status1 &"var space10="" "";" & vbcrlf
          Status1=Status1 &"var seq=0;" & vbcrlf
          Status1=Status1 &"function KSCMS_Status1() {" & vbcrlf
          Status1=Status1 &"len = msg.length;" & vbcrlf
          Status1=Status1 &"window.status = msg.substring(0, seq+1);" & vbcrlf
          Status1=Status1 &"seq++;" & vbcrlf

⌨️ 快捷键说明

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