-1
A
답변
2
HTML을
// use button
<button onclick="Redirectpage()">Coupon Code</button>
// use Img
<img src="" onclick="Redirectpage()"/>
당신의 자바 스크립트 코드에서 자바 스크립트
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');
});
모든 출력 아직 ? – Sherlock