答案 0 :(得分:2)
<强> HTML 强>
// use button
<button onclick="Redirectpage()">Coupon Code</button>
// use Img
<img src="" onclick="Redirectpage()"/>
<强>的Javascript 强>
function Redirectpage() {
location.href = "Put Your website here;
}
答案 1 :(得分:0)
<a href="<your new link here>" target="_blank" class="coupon_code">Coupon Code</a>
在您的javascript代码中
$(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
});
});
答案 2 :(得分:0)
试试这个;
$('button').on('click',function()({
`$(this).html('your coupon code here');`
` window.open('https://link.com', '_blank');
});