asp教程.net页面刷新的几种实现方法
第一:
c# codeprivate void button1_click( object sender, system.eventargs e )
{
response.redirect( request.url.tostring( ) );
}
第二:
c# codeprivate void button2_click( object sender, system.eventargs e )
{
response.write( " < script language=网页特效>window.location.href=document.url; < /script>" );
}
第三:
c# codeprivate void button3_click( object sender, system.eventargs e )
{
response.addheader( "refresh","0" );
}
第四:
c# codeprivate void button6_click( object sender, system.eventargs e )
{
//好像有些不对?
//response.write( " < script language=网页特效>window.location.reload( ); < /script>" ); }
第五:
html code< 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.onload=beginrefresh//--> < /script>< div 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"> 用window.location.href实现刷新另个框架页面
首页 1 2 3 末页