$.ajax ({type:"POST", URL:"/resource/logincheck", data: {id:id}, success:function (data) {if(Data.ok = =1) { varHref_url =DL_LINK[DLT]; if(OpenType = =1) {window.location.href=Href_url; }Else if(OpenType = =2){ //analog clicks cannot be achieved under Firefox$ (that). attr ('href', Href_url); $ (that). attr ('Target','_blank');
SetTimeout (function () {REPL (that);},1000); return true; }Else{Chwtip ('cannot download'); return false; } } Else if(Data.ok = =0) { if(Data.error = =1) {Chwtip ('Please login First'); return false; } Else if(Data.error = =3) {Chwtip ('parameter Error'); return false; } } }, Async:false });
function Repl (that) {
$ (that). attr (' href ', ' javascript:void (0); ');
$ (that). Removeattr (' target ');
}
Firefox cannot simulate hyperlink clicks, use window.open and other forms will be prompted to block. This must be done synchronously.
A tagged href hijacker, make a judgment after jumping in