Problem Description:
In the case of an IFRAME, in a child frame, use the following form of jump:
<href= "javascript:;" onclick= "parent.location.href= ' login.php ';" > exit </a>
In IE browser, click, will be in the case of exit, and then open a page, the URL is displayed as javascript:; , that is to say, a tag of javascript:; Not effective!
This is a strange phenomenon, and there is no such problem in modern browsers such as Google. The last guess is that the href attribute of a tag is parsed under IE by passing the value of the href to the parent frame, then a jump to the value of the href in the parent frame, and the value of the href is already a string and does not have the function of executing JS. Therefore the error is opened directly in a new window with the URL javascipt:; The solution to this problem is to block the default event for the a tag before passing it, as follows:
<href= "#" onclick= "parent.location.href= ' login.php '; return false ;" > exit </a>//or use jquery, the Event.preventdefault () method can also achieve the same effect.
Record for backup
IE (6-11) version, when using the framework of the IFRAME, via a tag javascript:; And JS Jump parent.location when it appears on the new page open case