HTML中點擊按鈕或鏈接時不跳轉(zhuǎn)只刷新頁面,在某些情況下還是比較實用的,下面整理些不錯的示例,感興趣的朋友可以參考下:
<input type=button value=刷新 onclick="history.go(0)">
<input type=button value=刷新 onclick="location.reload()">
<input type=button value=刷新 onclick="location=location">
<input type=button value=刷新 onclick="location.assign(location)">
<input type=button value=刷新 onclick="document.execCommand('Refresh')">
<input type=button value=刷新 onclick="window.navigate(location)">
<input type=button value=刷新 onclick="location.replace(location)">
<input type=button value=刷新 onclick="window.open('自身的文件','_self')">
<input type=button value=刷新 onClick=document.all.WebBrowser.ExecWB(22,1)>
<a href="javascript:void(0)" onclick="history.go(0)"></a>
<a href="javascript:void(0)" onclick="location=location"></a>
新聞熱點
疑難解答
圖片精選