日期:2014-05-16  浏览次数:20913 次

ASP中用UBB,怎么可以实现网页内标签内容的跳转
ASP中用UBB,实现网页内标签的跳转

有没有办法,让网页内的内容,做光标点击目录,则自动地跳转至本页内此目录的地方。

例如:
目录

1.序
2.正文
3.段落
4.结尾


1.序
....
....
.....


2.正文
.....
.....
.....
.....


3.段落
.....
......
.....

4.结尾
....
.....


我想前面的目录那里都是一个可点击标签,让光标一点,则自动地跳转至对应的下面内容处,请教我怎么可以做到此功能呢? 谢谢!我的UBB代码如下:

UBB.asp


<script LANGUAGE="JAVASCRIPT">
     //检查图片大小是否大于预期大小, 大于则显示为预期大小
     function show(chkw) { //chk size
                 if(chkw>800) {
                     chkw=800;
                     }
                 else {
                     chkw=chkw;
                 }
                 return chkw;
             }//script by shawl.qiu
     //example: <img src="images/03.jpg" onClick="openautosize(this.src)" onload="this.width=show(this.width)">
     
     //弹出窗口, 自适应图片大小,并自动居中显示
     function openautosize(ourl) { //ourl 为接收图片地址
             dimg = new Image(); //建立图像对象
             dimg.src = ourl; //确定图像地址
             w = dimg.width ; //图像宽度
             h = dimg.height; //图像高度
             x = (screen.width - w) / 2; //减去图片宽度, 然后宽/2
             y = (screen.height - h) / 2; //减去图片高度, 然后宽/2
             window.open(ourl,"newwindow","location=1,width="+w+",height="+h+",top="+y+",bottom="+y+",left="+x+",right="+x) ;
         }//shawl.qiu script
     //example:  <img src="images/03.jpg" onClick="openautosize(this.src)" onload="this.width=show(this.width)">
</script> 
<%
Const MaxLoopcount=50
function ubb(bod)  
Set re=new RegExp  
re.IgnoreCase =true   
re.Global=True   
bod = dvHTMLEncode(bod)
re.Pattern="(javascript)"
bod=re.Replace(bod,"<I>&#106avascript</I>")
re.Pattern="(jscript:)"
bod=re.Replace(bod,"<I>&#106script:</I>")
re.Pattern="(js:)"
bod=re.Repl