[英]How do I add onclick to a Selz button?
I have a Selz button and am trying to figure out how to add an onclick to it which will call a tracking function, onclick ='myfunction()'我有一个 Selz 按钮,并试图弄清楚如何向它添加一个onclick ,这将调用跟踪 function、 onclick ='myfunction()
I'm at a loss with this particular button.我对这个特殊的按钮不知所措。 I have added the onclick to other links and buttons, but this one baffles me.我已将onclick添加到其他链接和按钮,但这让我感到困惑。 I tried adding the onclick after "Buy The Digital Version" but it did not work.我尝试在“购买数字版”之后添加onclick ,但没有成功。
This is the code for the button:这是按钮的代码:
<script data-selz-t="_selz-btn-default" data-selz-a="modal" data-selz-checkout="true" data-selz-cb="6699cc" data-selz-chbg="ffffff" data-selz-chtx="000000" data-selz-b="http://selz.co/1234$XYZ" data-text="Buy The Digital Version">
if (typeof _$elz === "undefined") { var _$elz = {}; }
if (typeof _$elz.b === "undefined")
{
_$elz.b = { e: document.createElement("script") };
_$elz.b.e.src = "https://selz.com/embed/button;";
document.body.appendChild(_$elz.b.e);
}
</script>
Any assistance is appreciated.任何帮助表示赞赏。
Get the ID or Class of a button from browser in inspect element.从浏览器中的检查元素中获取按钮的 ID 或 Class。 And then with that ID or Class you can add js onclick event.然后使用该 ID 或 Class 您可以添加 js onclick 事件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.