1:<script type="text/javascript">
var photosr=new Array();
[!--photor--]
function GotoPhPage(page){
page=parseInt(page);
window.showpagephoto.innerHTML=photosr[page];
document.ViewPhotoForm.thisphpage.value=page;
document.ViewPhotoForm.tothephpage.options[page-1].selected=true;
}
//上一页
function PriPhPage(){
var thispage=parseInt(document.ViewPhotoForm.thisphpage.value);
var num=photosr.length;
if(thispage<=1)
{
return false;
}
GotoPhPage(thispage-1);
}
//下一页
function NextPhPage(){
var thispage=parseInt(document.ViewPhotoForm.thisphpage.value);
var num=photosr.length;
if(thispage>=num-1)
{
return false;
}
GotoPhPage(thispage+1);
}
function PhAutoPlay(){
var sec=parseInt(document.ViewPhotoForm.autoplaysec.value);
var i;
var num=photosr.length;
for(i=1;i<=sec;i++)
{
if(document.ViewPhotoForm.autophstop.value==0)
{
window.setTimeout("PhAutoPlayExe("+i+","+sec+")",i*1000);
}
else
{
break;
}
}
}
function PhAutoPlayExe(num,sec){
var t;
if(document.ViewPhotoForm.autophstop.value==1)
{
return "";
}
if(num==sec) 
{
t=NextPhPage();
if(t==false)
{
GotoPhPage(1);
}
PhAutoPlay();

}
</script>

<table width="100%" border="0" align="center" cellpadding="3" cellspacing="1">
  <tr> 
    <td height="25" id="showpagephoto" align="center"> 
      <!--list.var1-->
    </td>
  </tr>
  <form name="ViewPhotoForm" method="POST" action="">
    <tr> 
      <td height="25"> <div align="center"> 
          <input type="button" name="Submit" value="上一页" onClick="PriPhPage();">
          &nbsp;&nbsp; 
          <select name="tothephpage" onChange="GotoPhPage(this.options[this.selectedIndex].value)">
            [!--select--]
          </select>
          &nbsp;&nbsp; 
          <input type="button" name="Submit2" value="下一页" onClick="NextPhPage();">
          <input name="thisphpage" type="hidden" value="1">
        </div></td>
    </tr>
    <tr>
      <td height="25"><div align="center">
          <select name="autoplaysec">
            <option value="1">1秒</option>
            <option value="2">2秒</option>
            <option value="3" selected>3秒</option>
            <option value="4">4秒</option>
            <option value="5">5秒</option>
            <option value="6">6秒</option>
            <option value="7">7秒</option>
            <option value="8">8秒</option>
            <option value="9">9秒</option>
            <option value="10">10秒</option>
          </select>
  <input name="autophstop" type="hidden" value="0">
          <input type="button" name="Submit3" value="自动播放" onClick="document.ViewPhotoForm.autophstop.value=0;PhAutoPlay();">
          &nbsp;<input type="button" name="Submit32" value="停止播放" onClick="document.ViewPhotoForm.autophstop.value=1;">
        </div></td>
    </tr>
  </form>
</table>
2:
<a href='#ecms' onclick='NextPhPage();' title='点击进入下一张图片'><img src='[!--picurl--]' alt='[!--picname--]' border=1 onload='if(this.width>screen.width-500)this.style.width=screen.width-500;'></a><br><span style='line-height=18pt'>[!--picname--]</span>

解决方案 »

  1.   

    代码这样贴, 
    测试都不行,哎 
    觉得问题可能在下面<script   type= "text/javascript "> 
    var   photosr=new   Array(); 
    [!--photor--] 
    function   GotoPhPage(page){ 
    page=parseInt(page); 
    window.showpagephoto.innerHTML=photosr[page]; 
    document.ViewPhotoForm.thisphpage.value=page; 
    document.ViewPhotoForm.tothephpage.options[page-1].selected=true; 

    //上一页 
    function   PriPhPage(){ 
    var   thispage=parseInt(document.ViewPhotoForm.thisphpage.value); 
    var   num=photosr.length; 
    if(thispage <=1) 

    return   false; 

    GotoPhPage(thispage-1); 

    //下一页 
    function   NextPhPage(){ 
    var   thispage=parseInt(document.ViewPhotoForm.thisphpage.value); 
    var   num=photosr.length; 
    if(thispage> =num-1) 

    return   false; 

    GotoPhPage(thispage+1); 

    function   PhAutoPlay(){ 
    var   sec=parseInt(document.ViewPhotoForm.autoplaysec.value); 
    var   i; 
    var   num=photosr.length; 
    for(i=1;i <=sec;i++) 

    if(document.ViewPhotoForm.autophstop.value==0

    window.setTimeout( "PhAutoPlayExe( "+i+ ", "+sec+ ") ",i*1000); 

    else 

    break; 



    function   PhAutoPlayExe(num,sec){ 
    var   t; 
    if(document.ViewPhotoForm.autophstop.value==1

    return   " "; 

    if(num==sec)   

    t=NextPhPage(); 
    if(t==false) 

    GotoPhPage(1); 

    PhAutoPlay(); 
    }   

    </script> <table   width= "100% "   border= "0 "   align= "center "   cellpadding= "3 "   cellspacing= "1 "> 
        <tr>   
            <td   height= "25 "   id= "showpagephoto "   align= "center ">   
                <!--list.var1--> 
            </td> 
        </tr> 
        <form   name= "ViewPhotoForm "   method= "POST "   action= " "> 
            <tr>   
                <td   height= "25 ">   <div   align= "center ">   
                        <input   type= "button "   name= "Submit "   value= "上一页 "   onClick= "PriPhPage(); "> 
                        &nbsp;&nbsp;   
                        <select   name= "tothephpage "   onChange= "GotoPhPage(this.options[this.selectedIndex].value) "> 
                            [!--select--] 
                        </select> 
                        &nbsp;&nbsp;   
                        <input   type= "button "   name= "Submit2 "   value= "下一页 "   onClick= "NextPhPage(); "> 
                        <input   name= "thisphpage "   type= "hidden "   value= "1 "> 
                    </div> </td> 
            </tr> 
            <tr> 
                <td   height= "25 "> <div   align= "center "> 
                        <select   name= "autoplaysec "> 
                            <option   value= "1 "> 1秒 </option> 
                            <option   value= "2 "> 2秒 </option> 
                            <option   value= "3 "   selected> 3秒 </option> 
                            <option   value= "4 "> 4秒 </option> 
                            <option   value= "5 "> 5秒 </option> 
                            <option   value= "6 "> 6秒 </option> 
                            <option   value= "7 "> 7秒 </option> 
                            <option   value= "8 "> 8秒 </option> 
                            <option   value= "9 "> 9秒 </option> 
                            <option   value= "10 "> 10秒 </option> 
                        </select> 
        <input   name= "autophstop "   type= "hidden "   value= "0 "> 
                        <input   type= "button "   name= "Submit3 "   value= "自动播放 "   onClick= "document.ViewPhotoForm.autophstop.value=0;PhAutoPlay(); "> 
                        &nbsp; <input   type= "button "   name= "Submit32 "   value= "停止播放 "   onClick= "document.ViewPhotoForm.autophstop.value=1; "> 
                    </div> </td> 
            </tr> 
        </form> 
    </table> 
    2: 
    <a   href= '#ecms '   onclick= 'NextPhPage(); '   title= '点击进入下一张图片 '> <img   src= '[!--picurl--] '   alt= '[!--picname--] '   border=1   onload= 'if(this.width> screen.width-500)this.style.width=screen.width-500; '> </a> <br> <span   style= 'line-height=18pt '> [!--picname--] </span>