點(diǎn)擊按鈕或鏈接不跳轉(zhuǎn)只刷新頁面的腳本整理
更新時(shí)間:2013年10月22日 15:26:12 作者:
點(diǎn)擊按鈕或鏈接時(shí)不跳轉(zhuǎn)只刷新頁面,在某些情況下還是比較實(shí)用的,下面整理些不錯的示例,感興趣的朋友可以參考下
復(fù)制代碼 代碼如下:
<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>
相關(guān)文章
Array.prototype.slice 使用擴(kuò)展
slice 可以用來獲取數(shù)組片段,它返回新數(shù)組,不會修改原數(shù)組。2010-06-06javascript面向?qū)ο笕筇卣髦庋b實(shí)例詳解
這篇文章主要介紹了javascript面向?qū)ο笕筇卣髦庋b,簡單描述了封裝的基本概念、原理,并結(jié)合實(shí)例形式詳細(xì)分析了javascript面向?qū)ο蟪绦蛟O(shè)計(jì)中封裝的用法與相關(guān)操作注意事項(xiàng),需要的朋友可以參考下2019-07-07對JavaScript的eval()中使用函數(shù)的進(jìn)一步討論
《JavaScript語言精髓與編程實(shí)踐》的讀者I22141提出了一問題:為什么下面這段代碼在JScript 和SpiderMonkey中表現(xiàn)不一樣:2008-07-07JS.elementGetStyle(element, style)應(yīng)用示例
獲取Dom元素的Style數(shù)組中的指定Style元素,下面有個(gè)不錯的示例,感興趣的朋友可以參考下,希望對大家有所幫助2013-09-09javascript下利用arguments實(shí)現(xiàn)string.format函數(shù)
sitepoint上看到Andrew Tetlaw在08年寫的文章arguments: A JavaScript Oddity,閱讀之后,除了對arguments溫故知新一遍以外,印象最深刻的還是Andrew的第一個(gè)函數(shù)實(shí)現(xiàn)的string.format功能。2010-08-08Openlayers測量距離與面積的實(shí)現(xiàn)方法
這篇文章主要為大家詳細(xì)介紹了Openlayers測量距離與面積的實(shí)現(xiàn)方法,文中示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2020-09-09各種常用瀏覽器getBoundingClientRect的解析
getBoundingClientRect2009-05-05