如何从URL创建回传代码? [英] How do I create a passback tag from a URL?
本文介绍了如何从URL创建回传代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有几个广告网络已经能够整合回传网址(在付费广告展示不可用时请求)但是一个广告网络只能接受我没有的回传脚本标记。
I have a couple of ad networks that have been able to integrate a passback URL (requested when a paid ad impression is not available) but one ad network can only accept a passback script tag, which I don't have.
传回脚本需要将URL的内容(728x90图像或flash标题)加载到自身中(它还需要执行它加载的Javascript)。任何人都可以帮我构建一个回传脚本标签吗?
The passback script needs to load the contents of a URL (a 728x90 image or flash banner) into itself (it also needs to execute the Javascript that it loads). Can anyone help me construct a passback script tag?
我试过这个:
<SCRIPT language="Javascript">
// loads within itself, in the 728x90 banner space
document.write("<SCR"+"IPT language=\'Javascript\' src=\'http://www.mydomain.com/passback.php\'></SCR"+"IPT>");
</SCRIPT>
但是出现了脚本错误。有什么想法吗?
But got script errors. Any ideas?
推荐答案
只是一个想法。如果您尝试这样做会给出什么?
Just an idea. What does it give if you try this ?
<SCRIPT language="JavaScript" type="text/javascript">
var script = document.createElement("script");
script.type = "text/javascript"; // This is for HTML 4.01 validation
script.src = "http://www.mydomain.com/passback.php";
document.getElementsByTagName("head")[0].appendChild(script);
</SCRIPT>
这篇关于如何从URL创建回传代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文