我做了一个网页,里面用到iframe,并且通过两个小图片来控制iframe调用的网页上下滚动,代码就是从5dmedia以前的相关帖子中下的,但在应用过程中需要调用不是本地服务器中的
文件,结果上下滚动控制就不好使了,并提示网页有粗误,请高手解决此问题。
文件今天就要用,很急阿!!!!!!!!!!!
iframe调用本地的文件,滚动就好使,调用http://开头的外部文件就不好使
下面是网页代码:
chechedesign      marginwidth="0">
   
   
     | 
    ![]() onmouseout=movover();o_up(this) onmouseover=movstar(-1,20);o_down(this) onmouseup=movover();movstar(-1,20) src="images/other_scr_up.gif"
 width=17>
 | 
  
  
     | 
  
  
    ![]() onMouseDown=movover();movstar(3,2) onMouseOut=movover();o_up(this) onMouseOver=movstar(1,20);o_down(this) onMouseUp=movover();movstar(1,20)
 src="images/other_scr_down.gif" width=17>
 | 
  
   
 
  
    
 大家注意文件头的那段代码:
 <STYLE type=text/css>
 
 .title {COLOR: #cccccc; FONT-SIZE: 9pt; FONT-WEIGHT: normal}
 
 .link_ {COLOR: #666666; FONT-SIZE: 9pt; TEXT-DECORATION: none}
 
 .opacity {FILTER: alpha(opacity=100)}
 
 </STYLE>
 
 <SCRIPT>
 
 function movstar(a,time){
 
 movx=setInterval("mov("+a+")",10)
 
 }
 
 function movover(){
 
 clearInterval(movx)
 
 }
 
 function mov(a){
 
 scrollx=new_date.document.body.scrollLeft
 
 scrolly=new_date.document.body.scrollTop
 
 scrolly=scrolly+a
 
 new_date.window.scroll(scrollx,scrolly)
 
 }
 
 function o_down(theobject){
 
 object=theobject
 
 while(object.filters.alpha.opacity>60){
 
 object.filters.alpha.opacity+=-10}
 
 }
 
 function o_up(theobject){
 
 object=theobject
 
 while(object.filters.alpha.opacity<100){
 
 object.filters.alpha.opacity+=10}
 
 }
 
 function wback(){
 
 if(new_date.history.length==0){window.history.back()}
 
 else{new_date.history.back()}
 
 }
 
 </SCRIPT>
 
 以及中间有一段代码是插入另一个网页的HTML代码:
 
 <IFRAME
 
 border=0 frameBorder=0 frameSpacing=0 height=200 marginHeight=0
 
 marginWidth=0 name=new_date noResize scrolling=no
 
 src="date.htm" width=500 vspale="0"> </IFRAME>
 
 
 另外两个上下按钮的代码也要注意:
 
 <IMG class=opacity height=17 onmousedown=movover();movstar(-3,2)
 
 onmouseout=movover();o_up(this) onmouseover=movstar(-1,20);o_down(this)
 
 
 onmouseup=movover();movstar(-1,20) src="images/other_scr_up.gif"
 
 
 width=17> (此处是向上按时的按钮图片代码)
 
 
 
 |