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

推荐订阅源

T
The Blog of Author Tim Ferriss
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
云风的 BLOG
云风的 BLOG
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
P
Palo Alto Networks Blog
D
Docker
H
Hackread – Cybersecurity News, Data Breaches, AI and More
S
Schneier on Security
Engineering at Meta
Engineering at Meta
I
InfoQ
L
LangChain Blog
Cyberwarzone
Cyberwarzone
T
Tenable Blog
WordPress大学
WordPress大学
P
Privacy & Cybersecurity Law Blog
罗磊的独立博客
Apple Machine Learning Research
Apple Machine Learning Research
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Jina AI
Jina AI
C
CERT Recently Published Vulnerability Notes
Scott Helme
Scott Helme
博客园 - 三生石上(FineUI控件)
酷 壳 – CoolShell
酷 壳 – CoolShell
Know Your Adversary
Know Your Adversary
D
Darknet – Hacking Tools, Hacker News & Cyber Security
The Last Watchdog
The Last Watchdog
Last Week in AI
Last Week in AI
Cloudbric
Cloudbric
S
SegmentFault 最新的问题
爱范儿
爱范儿
Application and Cybersecurity Blog
Application and Cybersecurity Blog
博客园 - 叶小钗
AI
AI
T
Tor Project blog
I
Intezer
T
Threatpost
www.infosecurity-magazine.com
www.infosecurity-magazine.com
V
Visual Studio Blog
N
News and Events Feed by Topic
Latest news
Latest news
S
Security Affairs
博客园 - Franky
Microsoft Security Blog
Microsoft Security Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
B
Blog RSS Feed
C
Cybersecurity and Infrastructure Security Agency CISA
Hugging Face - Blog
Hugging Face - Blog
小众软件
小众软件
S
Securelist

博客园 - 上午的绝缘杯

金斗云提醒用法说明 金斗云提醒软件的原理 webbrowser使用心得 向大家推荐一个谷歌浏览器笑话插件:一日一笑 企业知识管理专家:KMaster知识管理平台简介 KMaster知识管理平台功能简介 知识库如何跟其他业务系统结合 知识管理系统中的知识门户 KMaster知识库的特色功能 当前知识管理系统的焦点问题以及我的一些解决办法 企业级知识库系统KMaster推荐 jQuery高亮插件 使用 .NET 实现 Ajax 长连接 (Part 2 - Mutex Wait & Signal) 利用Jquery实现http长连接(LongPoll) - 上午的绝缘杯 - 博客园 使用 .NET 实现 Ajax 长连接 (Part 1 - Comet Web Service) Comet:基于 HTTP 长连接的“服务器推”技术 非常好的进度条生成网站 火车票刷票器 学习lucene.net的好网站(不断添加)
ie6下的location.href错误 - 上午的绝缘杯 - 博客园
上午的绝缘杯 · 2011-01-05 · via 博客园 - 上午的绝缘杯

<a href="javascript:void(0);"
                onclick="if(confirm('您确定要互换手机1和手机2的号码吗?')) {location.href='ExchangeMobile.aspx?id=<%=_customerInfo.ID %>';}"
                title="手机1手机2号码互换">互换</a>

上面的代码在ie6下无法正常跳转,查了下,在后面加上retrun false后就能解决这个问题。

另外又查到了其他的解决办法:

<script type="text/javascript">   
function goUrl(x)   
{   
     window.location.href
=x;   
}   
</script>   
<a href="javascript:;" onclick="javascript:goUrl('http://www.sina.com');">跳转1</a>   
<a href="javascript:void(0);" onclick="javascript:goUrl('http://www.sina.com');">跳转2</a>   
<a href="javascript:void(0);" onclick="javascript:goUrl('http://www.sina.com');return false;">跳转3</a>   
<a href="#" onclick="javascript:goUrl('http://www.sina.com');">跳转4</a>   
<a href="###" onclick="javascript:goUrl('http://www.sina.com');">跳转5</a>  

测试环境IE6,IE7,Firefox 3。

跳转1和2在IE6环境下无效,3、4、5在IE6,IE7,Firefox3.01下测试均能 通过,。

跳转4和5最简洁。

关键在于<a>的href属性,空链接用"#","###"。

为了不返回网页顶端。

空链接推荐用"###"。

来源:http://www.cnblogs.com/kaima/archive/2008/08/22/1273808.html