Empty HTML href leads to directory listing in IE

拥有回忆 提交于 2019-12-01 18:07:14

From http://msdn.microsoft.com/en-us/library/cc848861%28v=vs.85%29.aspx

If HREF is specified as a blank value ( href="" or href=), executing the link might display the directory containing the current document , or it might generate an error, depending on other elements in the document and the server environment.

This behaviour is by design and there is no work around. You'll have to come up with something that doesn't use a blank href value, such as href="#"

Change it to <a href="#"> or <a href="javascript:;">

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!