A few days ago, I learned this together in the group...
If you only want to check whether the page exists or not, you can directly set the target to use the pseudo protocol to solve the problem...
However, if IFRAME [name] is used, it will involve the onload issue... so it will be a lot of trouble ....
The following only adds a delay... there is no "real" issue of onload processing .... in fact, we can loop through windows. open to solve the problem, but it's just a bit lazy... ^
<A href = "javascript: void (0);" onclick = "openc ('HTTP: // www.google.cn/', 'cs', this)"> Google </a>
<SCRIPT type = "text/JavaScript">
Window. openc = function (href, target, e ){
Try {
Window. Open ('javascript: If (! Document. Body) {opener. openc. isnull = true; opener. Open ("C. asp"); close () ;}', target | '');
Window. setTimeout (function (){
If (window. openc. isnull ){
Delete window. openc. isnull;
Window. setTimeout (function (){
E. fireevent ('onclick ');
},500 );
} Else {
Window. Open (href, target );
}
},100 );
} Catch (exp ){
Alert (exp. Message );
}
};
</SCRIPT>