[英]Open New Tab/Window
$output .= '<a class="icon icon2 shopping-cart ttip add_to_cart_button product_type_'
.$product->product_type.'" data-product_id="'
.$product->id.'" href="'.$link
.'" rel="tooltip" data-placement="bottom" title="'
.$label.'" onclick="window.open(this.href); return false;" ></a>
我嘗試添加onclick="window.open(this.href); return false;
似乎是正確的,但是一旦單擊,它就會打開到新選項卡,並且url會更改,但是頁面仍然像主頁一樣。
給窗口命名並指定屬性width / height。
onclick="window.open(this.href, 'myWindow', 'height=200,width=500'); return false;"
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.