asp.net重新整理本頁面的六種方法總結_javascript技巧

來源:互聯網
上載者:User

第一:
private void Button1_Click( object sender, System.EventArgs e )  
{
    Response.Redirect( Request.Url.ToString( ) );
}

第二:
private void Button2_Click( object sender, System.EventArgs e )  
{
    Response.Write( "
    <script language=javascript>window.location.href=document.URL;
    </script>" );
}

第三:
private void Button3_Click( object sender, System.EventArgs e )  
{
    Response.AddHeader( "Refresh","0" );
}

第四:
private void Button6_Click( object sender, System.EventArgs e )  
{
    //好像有些不對?
    //Response.Write( "
    <script language=javascript>window.location.reload( );
    </script>" );
}

第五:(需替換<>)
<script><!--
var limit="3:00"
if ( document.images )
{
    var parselimit=limit.split( ":" )parselimit=parselimit[0]*60+parselimit[1]*1
}
function beginrefresh( )
{
    if ( !document.images )returnif ( parselimit==1 )window.location.reload( )else
    {
        parselimit-=1curmin=Math.floor( parselimit/60 )cursec=parselimit% 60if ( curmin!=0 )curtime=curmin+"分"+cursec+"秒後重刷本頁!"elsecurtime=cursec+ "秒後重刷本頁!"window.status=curtimesetTimeout( "beginrefresh( )",1000 )
    }
}
window. style="Z-INDEX: 102;
LEFT: 408px;
POSITION: absolute;
TOP: 232px" ms_positioning="text2D">
<P><FONT size="3">自動重新整理頁面</FONT></P>
</DIV>

第六:
<meta http-equiv="refresh" content="300;
url=target.html">

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.