dongyu1125 2018-07-05 16:32
浏览 65

隐藏Javascript代码段

I am trying to keep track of users clicking on a button within my marketing automation software, Infusionsoft. Infusionsoft gives me a snippet which I would like to add to my 'Click Here' button shown below. However, I would like to remove the form itself as it is not necessary to show. When a user clicks on the button, the javascript snippet would still run in the background. I realize this might be a round-about-way of solving this problem, so I'm welcoming all suggestions for improvements.

Is there anyway I can hide this form while still utilizing this snippet code when a user click on 'Click Here'?

From what I've researched, it seems like:

1) I would have to implement some third party solution, such as Flash or Flex (prefer not to do this)

2) I've tried utilizing a <p hidden> tag, but that didn't seem to work

3) Add a separate JS file and reference that JS file in my HTML (but not exactly sure how this would make it work)

Below is a screenshot of what my site looks like: Form Screenshot

Would like to remove the form above

Below is my code:

<p><a target="_blank" title="Click to download all 7 I Love It ads" onclick="window.open('<?php echo $urlStringILI; ?>','popup','width=450,height=350,left='+(screen.availWidth/2-200)+',top='+(screen.availHeight/2-125)+'');return false;" href="<?php echo $urlStringILI; ?>" ><strong>Click Here</strong></a> To  Download The &ldquo;I Love It Because I Chose It&rdquo; Ads
    <script type='text/javascript' src='https://fb976.infusionsoft.com/app/form/iframe/db670b7e512a36318bcc43f5592377ec'></script>
</p>
  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 安卓adb backup备份应用数据失败
    • ¥15 eclipse运行项目时遇到的问题
    • ¥15 关于#c##的问题:最近需要用CAT工具Trados进行一些开发
    • ¥15 南大pa1 小游戏没有界面,并且报了如下错误,尝试过换显卡驱动,但是好像不行
    • ¥15 没有证书,nginx怎么反向代理到只能接受https的公网网站
    • ¥50 成都蓉城足球俱乐部小程序抢票
    • ¥15 yolov7训练自己的数据集
    • ¥15 esp8266与51单片机连接问题(标签-单片机|关键词-串口)(相关搜索:51单片机|单片机|测试代码)
    • ¥15 电力市场出清matlab yalmip kkt 双层优化问题
    • ¥30 ros小车路径规划实现不了,如何解决?(操作系统-ubuntu)