加入收藏 | 设为首页 | 会员中心 | 我要投稿 聊城站长网 (https://www.0635zz.com/)- 智能语音交互、行业智能、AI应用、云计算、5G!
当前位置: 首页 > 运营中心 > 建站资源 > 经验 > 正文

阐述HTML点击按钮或链接不跳转只刷新页面的方法

发布时间:2023-10-26 14:56:38 所属栏目:经验 来源:
导读:HTML中点击按钮或链接时不跳转只刷新页面,在某些情况下还是比较实用的,下面整理些不错的示例,感兴趣的朋友可以参考下:

<input type=button value=刷新 onclick="history.go(0)">

<input type=button val
HTML中点击按钮或链接时不跳转只刷新页面,在某些情况下还是比较实用的,下面整理些不错的示例,感兴趣的朋友可以参考下:
 
<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>
 

(编辑:聊城站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章