Re: _blank失效

看板Web_Design作者 (LY)時間12年前 (2013/09/04 10:44), 編輯推噓1(100)
留言1則, 1人參與, 最新討論串2/2 (看更多)
※ 引述《vickykuo (郭大屁)》之銘言: : 遇到一個怪問題,設定了target="_blank" : 可是頁面會另外開一頁,本頁也會同步跳成連結的那一頁 : http://chicing.creatcell.net/crossindustry.php : 左側"人才招募"就是這樣 : 是js的問題嗎?@@...求問好心的高手 : 謝謝!! 問題出在這段 $(function(){ $("#qaContent > ul > li > .qa_title").click(function(){ if($(this).parent().has("ul").length){ var _this= $(this).parent().find(".qa_content"); if($(_this).css("display")=="none"){ $(_this).slideDown(); }else{ $(_this).slideUp(); } return false; } else { var href= $(this).parent().find("a").attr('href'); window.location.href = href; //兇手 } }); }); 應該判斷有沒有attr('target','_blank') false的話才用window.location.href -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.113.235.116

09/04 11:18, , 1F
感謝你!!!!!! >"< 已經調整好了!!!!!!
09/04 11:18, 1F
文章代碼(AID): #1I9fwcYG (Web_Design)
討論串 (同標題文章)
本文引述了以下文章的的內容:
完整討論串 (本文為第 2 之 2 篇):
文章代碼(AID): #1I9fwcYG (Web_Design)