href="javascript:"和href="javascript:void(0);"
时间:
2015-08-05 14:23:44
阅读:
168
评论:
收藏:
0
[点我收藏+]
<a onclick="fn()">Does not appear as a link, because there‘s no href</a>
- <a href="javascript:void(0)" onclick="fn()">fn is called</a>
- <a href="javascript:undefined" onclick="fn()">fn is called</a>
- <a href="javascript:" onclick="fn()">fn is called too!</a> 这三个是等价的。
href="javascript:"和href="javascript:void(0);"
原文:http://www.cnblogs.com/zhuni/p/4704424.html