联系表7中的JavaScript [英] JavaScript in Contact Form 7

查看:51
本文介绍了联系表7中的JavaScript的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要联系表7和其他设置的帮助。

I need a help with Contact Form 7 and additional settings.

我想添加以下脚本:

<script type="text/javascript" src="https://example.js?mid=0000&refer=example_name"></script>

on_sent_ok:

我尝试了很多方法,但是没有用。 / p>

I tried to do it in many ways but it is not working.

推荐答案

on_sent_ok 需要一串可执行的JS代码。

on_sent_ok expects a string of executable JS code.

因此,要加载和执行外部脚本,可以使用jQuery的getScript,如下所示:

So to load and execute an external script, you can use jQuery's getScript, like so:

on_sent_ok: '$.getScript("https://example.js?mid=0000&refer=example_name‌​")'

这篇关于联系表7中的JavaScript的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆