2016-07-21 6 views

答えて

2

Htmlの

// use button 
<button onclick="Redirectpage()">Coupon Code</button> 

// use Img 
<img src="" onclick="Redirectpage()"/> 

あなたのjavascriptのコードはJavaScript

function Redirectpage() { 
    location.href = "Put Your website here; 
} 
+0

、私はいくつかの間違いをしているかもしれない、私は適切なコードを提供することができます、私は技術分野からではありません。 –

0
<a href="<your new link here>" target="_blank" class="coupon_code">Coupon Code</a> 

$(document).ready(function(){ 
    $(".coupon_code").click(function(){ 

     // place your javascript code for open popup of coupon code 

     return true; // it will redirect to href link in new tab 
    }); 
}); 
0

これを試してください。まだ

$('button').on('click',function()({

`$(this).html('your coupon code here');` 
    ` window.open('https://link.com', '_blank'); 

});

関連する問題