点击按钮打开新标签中的链接,但保留在原始页面上

时间:2015-07-21 16:56:24

标签: php jquery button

继承我的代码请有人帮我纠正它当我点击按钮它打开新标签中的链接并将焦点转移到新标签但我希望焦点保留在原始标签上

  <a <?php if($offerlink != '') echo 'target="_blank"';?> href="<?php echo $offerlink; ?>" class="input button red secondary responsive toggle_coupon">
                                                <?php echo $button;?>
                                            </a>
                                            <span class="input button border high secondary responsive hidden_coupon">
                                                <?php echo $code;?>
                                            </span>
                                        <?php } 
                                        elseif($url != '') {
                                            $offerlink = home_url('/') . '?visit-offer=' . $post->ID; ?>
                                            <a target="_blank" href="<?php echo $offerlink; ?>" class="input button blue secondary responsive">
                                                <?php _e('Visit offer', 'Couponize');?>
                                            </a>

0 个答案:

没有答案