$.ajaxPrefilter(function(options) { if(options.crossDomain && jQuery.support.cors) { var http = (window.location.protocol === 'http:' ? 'http:' : 'https:'); options.url = http + '//cors-anywhere.herokuapp.com/' + options.url; } }); $.ajax({ crossOrigin: true, url: goUrl, success: function(data) { data = data.replace(/data-src/g, "src"); var sourceHtml = 'data:text/html;charset=utf-8,' + data; $("#homepageIframe").attr("src" , sourceHtml); } });
iframe 引用微信公众号文章图片不显示问题
最新推荐文章于 2023-11-28 14:30:43 发布