惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Engineering at Meta
Engineering at Meta
D
DataBreaches.Net
云风的 BLOG
云风的 BLOG
B
Blog
T
The Blog of Author Tim Ferriss
MyScale Blog
MyScale Blog
A
About on SuperTechFans
H
Heimdal Security Blog
AI
AI
F
Full Disclosure
The Last Watchdog
The Last Watchdog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
量子位
I
InfoQ
Martin Fowler
Martin Fowler
MongoDB | Blog
MongoDB | Blog
WordPress大学
WordPress大学
Hugging Face - Blog
Hugging Face - Blog
小众软件
小众软件
N
News and Events Feed by Topic
腾讯CDC
L
LINUX DO - 最新话题
Attack and Defense Labs
Attack and Defense Labs
Hacker News: Ask HN
Hacker News: Ask HN
Google Online Security Blog
Google Online Security Blog
博客园_首页
Forbes - Security
Forbes - Security
The Register - Security
The Register - Security
博客园 - 三生石上(FineUI控件)
PCI Perspectives
PCI Perspectives
V
Vulnerabilities – Threatpost
The Cloudflare Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
Recent Commits to openclaw:main
Recent Commits to openclaw:main
L
LangChain Blog
Security Archives - TechRepublic
Security Archives - TechRepublic
NISL@THU
NISL@THU
博客园 - Franky
Microsoft Security Blog
Microsoft Security Blog
J
Java Code Geeks
Simon Willison's Weblog
Simon Willison's Weblog
O
OpenAI News
H
Hacker News: Front Page
Project Zero
Project Zero
P
Privacy International News Feed
Cyberwarzone
Cyberwarzone
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
大猫的无限游戏
大猫的无限游戏
Application and Cybersecurity Blog
Application and Cybersecurity Blog

博客园 - Brave Heart

不能访问Temporary ASP.NET Files的问题 使用 IntelliTrace 调试应用程序 Javascript实现页面跳转的问题 - Brave Heart - 博客园 估计堆的大小 怎样查看SQL Server数据表的数据页结构(转载) "服务器 '*********' 上的 MSDTC 不可用"错误的解决方法 Asp.Net在SqlServer中的图片存取技术 [转] SHTML 教程 自增字段的SQL语句解决方案 优化数据库的方法及SQL语句优化原则 DBA在系统设计、开发中的重要性 ADSI概览 .NET平台网站架构调优实践点滴 SQL SERVER 2005 DATABASE--公用表表达式(CTE) 学习.Net的经典网站(转载自CSDN技术中心) 操作Excel生成的mht代码 基本的xml操作类 实现Logo滑动 代码:确定两个日期之间的间隔 (Visual C#)
a href="#"与 a href="javascript:void(0)" 的区别
Brave Heart · 2011-01-20 · via 博客园 - Brave Heart

#包含了一个位置信息

默认的锚点是#top 也就是网页的上端

而javascript:void(0) 仅仅表示一个死链接

这就是为什么有的时候页面很长浏览链接明明是#可是

跳动到了页首

而javascript:void(0) 则不是如此

所以调用脚本的时候最好用void(0),

另外void(0)还可以解决一个问题是,我们可能要reload页面,

使用: 

window.location.href = window.location.href;

但是如果使用#的话,可能在你点了这个a标签之后,在地址栏的url上偷偷的加上了#,从而会导致你reload没有成功,而只是调到页首。