账号通
    

账号  

密码  

380279

查看

745

回复
主题:{$AutoID}第一贴:利用{$AutoID}做的sql标签 [收藏主题] 本贴被认定为精华 转到:  
gangangd 当前离线

3

主题

0

广播

0

粉丝
添加关注
级别:学前班

用户积分:65 分
登录次数:5 次
注册时间:2009/8/11
最后登录:2009/9/2
gangangd 发表于:2009/8/13 17:00:00   | 显示全部帖子 查看该作者主题 楼主 
 
  支持(0) | 反对(0) 回到顶部顶端 回到底部底部
gangangd 当前离线

3

主题

0

广播

0

粉丝
添加关注
级别:学前班

用户积分:65 分
登录次数:5 次
注册时间:2009/8/11
最后登录:2009/9/2
gangangd 发表于:2009/8/13 17:02:00   | 显示全部帖子 查看该作者主题 沙发 
科汛在线商城系统(NET)

{SQL_最新英语公告(10,20081132591791,ID)}


查询语句:


select top {$Param(0)} ID,Tid,Title,Author,Adddate from KS_U_news where Tid in(select ID from KS_Class where TS like '%{$Param(1)}%') and Verific=1 order by {$Param(2)} desc

循环语句:



<script type="text/javascript">
var messages=new Array()
[loop={$Param(0)}]messages[{$AutoID}-1]="<a class='move' href='{$Field(ID,GetInfoUrl,110,1)}' title='{$Field(Title,Text,0,...,0,)}' target='_blank'> .{$Field(Title,Text,24,...,0,)} [{$Field(Adddate,Text,0,...,0,)}]</a>"
[/loop]

//configure the below five variables to change the style of the scroller
var scrollerdelay='3000' //delay between msg scrolls. 3000=3 seconds.
var scrollerwidth='290px'
var scrollerheight='25px'
var scrollerbgcolor=''
//set below to '' if you don't wish to use a background image
var scrollerbackground=''


///////Do not edit pass this line///////////////////////


var ie=document.all
var dom=document.getElementById


if (messages.length>2)
i=2
else
i=0


function move(whichdiv){
tdiv=eval(whichdiv)
if (parseInt(tdiv.style.top)>0&&parseInt(tdiv.style.top)<=5){
tdiv.style.top=0+"px"
setTimeout("move(tdiv)",scrollerdelay)
setTimeout("move2(second2_obj)",scrollerdelay)
return
}
if (parseInt(tdiv.style.top)>=tdiv.offsetHeight*-1){
tdiv.style.top=parseInt(tdiv.style.top)-5+"px"
setTimeout("move(tdiv)",50)
}
else{
tdiv.style.top=parseInt(scrollerheight)+"px"
tdiv.innerHTML=messages[i]
if (i==messages.length-1)
i=0
else
i++
}
}


function move2(whichdiv){
tdiv2=eval(whichdiv)
if (parseInt(tdiv2.style.top)>0&&parseInt(tdiv2.style.top)<=5){
tdiv2.style.top=0+"px"
setTimeout("move2(tdiv2)",scrollerdelay)
setTimeout("move(first2_obj)",scrollerdelay)
return
}
if (parseInt(tdiv2.style.top)>=tdiv2.offsetHeight*-1){
tdiv2.style.top=parseInt(tdiv2.style.top)-5+"px"
setTimeout("move2(second2_obj)",50)
}
else{
tdiv2.style.top=parseInt(scrollerheight)+"px"
tdiv2.innerHTML=messages[i]
if (i==messages.length-1)
i=0
else
i++
}
}


function startscroll(){
first2_obj=ie? first2 : document.getElementById("first2")
second2_obj=ie? second2 : document.getElementById("second2")
move(first2_obj)
second2_obj.style.top=scrollerheight
second2_obj.style.visibility='visible'
}


if (ie||dom){
document.writeln('<div id="main2" style="position:relative;width:'+scrollerwidth+';height:'+scrollerheight+';overflow:hidden;background-color:'+scrollerbgcolor+' ;background-image:url('+scrollerbackground+');float:left;">')
document.writeln('<div style="position:absolute;width:'+scrollerwidth+';height:'+scrollerheight+';clip:rect(0 '+scrollerwidth+' '+scrollerheight+' 0);left:0px;top:0px;text-align:left;">')
document.writeln('<div id="first2" style="position:absolute;width:'+scrollerwidth+';left:0px;top:1px;float:left;">')
document.write(messages[0])
document.writeln('</div>')
document.writeln('<div id="second2" style="position:absolute;width:'+scrollerwidth+';left:0px;top:0px;float:left;visibility:hidden">')
document.write(messages[dyndetermine=(messages.length==1)? 0 : 1])
document.writeln('</div>')
document.writeln('</div>')
document.writeln('</div>')
}


if (window.addEventListener)
window.addEventListener("load", startscroll, false)
else if (window.attachEvent)
window.attachEvent("onload", startscroll)
else if (ie||dom)
window.onload=startscroll
</script>

 
  支持(0) | 反对(0) 回到顶部顶端 回到底部底部
<上一主题 | 下一主题 >
Powered By KesionCMS Version X1
厦门科汛软件有限公司 © 2006-2016 页面执行2.23438秒 powered by KesionCMS 9.0