使用jQuery在页面后加载广告

时间:2012-04-15 17:53:11

标签: jquery ads

这只是一个问题,有什么方法可以在页面后加载广告..?像mediafire这样的东西

示例http://www.mediafire.com/?ohd522ats0qjb8d

我尝试使用jquery制作一些技巧但不起作用:(我的广告代码看起来像这样

<!-- BEGIN SMOWTION TAG - 728x90 - DO NOT MODIFY -->
<script type="text/javascript" defer="defer"><!--
smowtion_size = "728x90";
smowtion_section = "87as8d48aas";
//-->
</script>
<script type="text/javascript"
src="http://ads.smowtion.com/ad.js?s=87as8d48aas&z=728x90">
</script>
<!-- END SMOWTION TAG - 728x90 - DO NOT MODIFY -->

4 个答案:

答案 0 :(得分:1)

这可能是针对某些人的TOS,但你可能会这样做:

$(function() {
    $.getScript('http://ads.smowtion.com/ad.js?s=87as8d48aas&z=728x90', function() {
       smowtion_size = "728x90";
       smowtion_section = "87as8d48aas";
    });
});

答案 1 :(得分:0)

你可以检查firebug控制台是否有任何错误?这可能是没有出现的原因之一。

答案 2 :(得分:0)

$(document).ready(function() {
      $.getScript('http://ads.smowtion.com/ad.js?s=87as8d48aas&z=728x90', function() {
          smowtion_size = "728x90";
          smowtion_section = "87as8d48aas";
      });
});

答案 3 :(得分:0)

假设你想把你的添加放在一个id = add

的div中
$(function(){
   $('#add').append('<script type="text/javascript" defer="defer">
                       smowtion_size = "728x90";
                       smowtion_section = "87as8d48aas";
                    </script>
                    <script type="text/javascript" src="http://ads.smowtion.com/ad.js?s=87as8d48aas&z=728x90"></script>
                     ');
});
相关问题