本文介绍了Google Adsense内部的jQuery对话框?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用jquery打开对话框的网站

  function showDialogUser(url,options){
if (!$('#myDialogUser')。对话框('isOpen')){
$(#mydialogUser)对话框(close);
}
options = options || {};
var tag = $('#myDialogUser');
//该标签将保留对话框内容。
$ .ajax({
url:url,
type:(options.type ||'GET'),
beforeSend:options.beforeSend,
error: options.error,
complete:options.complete,
success:function(data,textStatus,jqXHR){
if(typeof data ==object&& data.html) {// response被假定为JSON
tag.html(data.html).dialog({modal:options.modal,title:data.title,height:550,width:1000})。dialog('打开');
} else {//响应被假定为HTML
var matches = data.match(/< title>(。*?)< \ / title> /);
var spUrlTitle = matches [1];
tag.html(data).dialog({modal:true,title:spUrlTitle,height:560,width:1000})。dialog('open' ;
}
$ .isFunction(options.success)&&(options.success)(data,textStatus,jqXHR);
}
});
}

它加载另一个包含google adsense代码的page.asp文件。 p>

问题是它没有显示广告。



当我尝试访问我的浏览器会显示广告。



我该怎么做?我尝试了几种方式,但没有起作用。



谢谢

解决方案

Google adsense将无法在jQuery UI对话框内正常工作,因为这将需要移动adsense html,从而导致无效的展示,从而导致帐户关闭风险。



我建议反对。


I have a website that opens a dialog using jquery

function showDialogUser(url, options){
    if (!$('#myDialogUser').dialog('isOpen')) {
    $("#mydialogUser").dialog("close");
}
   options = options || {};
   var tag = $('#myDialogUser');
 //This tag will the hold the dialog content.
   $.ajax({
     url: url,
     type: (options.type || 'GET'),
     beforeSend: options.beforeSend,
     error: options.error,
     complete: options.complete,
     success: function(data, textStatus, jqXHR) {
       if(typeof data == "object" && data.html) { //response is assumed to be JSON
         tag.html(data.html).dialog({modal: options.modal, title: data.title, height: 550, width: 1000}).dialog('open');
       } else { //response is assumed to be HTML
    var matches = data.match(/<title>(.*?)<\/title>/);
        var spUrlTitle = matches[1];
         tag.html(data).dialog({modal: true, title: spUrlTitle, height: 560, width: 1000}).dialog('open');
       }
       $.isFunction(options.success) && (options.success)(data, textStatus, jqXHR);
     }
   });
}

It loads another page.asp file that contains a google adsense code.

The problem is that it is not displaying the ad.

When I try to access the page.asp on my browser the ad appear.

How can I do it ? I tried several ways but it didn't work

Thanks

解决方案

Google adsense won't work properly inside of a jQuery UI Dialog because it would require moving the adsense html, which could in turn generate invalid impressions, risking your account being closed.

I suggest against it.

这篇关于Google Adsense内部的jQuery对话框?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-26 06:04