看板 Web_Design 關於我們 聯絡資訊
各位先進大家好 小弟最近在接公司網頁時有一些疑問 問題如下 1.後端工程師問我要如何用網址指出 彈出式視窗的頁面 原本寫的是 <li><span>2015-04-13</span ><a href="http://www.xxx.com.tw/media.aspx#" class="overlay" rel="#event6"> </a></li> 我發現前一個人這樣寫 <script> // Overlay $("a.overlay[rel]").overlay({ top: 0, mask: { color: '#000', loadSpeed: 200, opacity: 0.8 }, fixed: true, onLoad: function () { var t = $.mask; if (!t.isLoaded()) { t.load(); var ov = this.getOverlay(); ov.css('z-index', '9999'); } } }); //$("div.bin-main").bind("click", function () { // console.log($(this).find("a").html()); // $(this).find("a").click(); // return; //}); function divClick(e) { if ($(e).find("a").attr('href') != "#") { window.open($(e).find("a").attr('href')); return; } $(e).find("a").click(); } // Scrollto $(function () { $('#subnav a[href*=#]:not([href=#])').click(function () { if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') && location.hostname == this.hostname) { var target = $(this.hash); target = target.length ? target : $('[name=' + this.hash.slice(1) + ']'); if (target.length) { $('html,body').animate({ scrollTop: target.offset().top }, 1000); return false; } } }); }) </script> 所以點了之後視窗彈出但網址不變 那麼我可以用什麼樣的方式直接指向彈出式視窗打開後的頁面呢? -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 114.37.92.38 ※ 文章網址: https://www.ptt.cc/bbs/Web_Design/M.1451195395.A.FC1.html
cokellen: 看不懂你的問題的意思? 12/27 17:26
※ 編輯: wen09210 (114.37.92.38), 12/27/2015 17:29:27
wen09210: 其實我想問的只是有辦法用網址直接指出popup 的視窗嗎, 12/27 17:31
wen09210: 像用錨點那樣 12/27 17:31
aspdoctor: 直接指向是什麼意思 12/28 01:30
wen09210: 如何用網址直接導入已彈出的視窗 12/28 13:32
hit1205: 你是希望這樣子嗎: 12/28 19:41
hit1205: 有<a>的那個頁面,假設是 test.com/abc/ 12/28 19:42
hit1205: 那使用 test.com/abc/#popup1 之類的錨點 12/28 19:42
hit1205: 就變成一連直接彈出 popup? 12/28 19:42
hit1205: 如果是的話,找找 location.hash 吧 12/28 19:43