<body>
<div id="adArea" style="width:320px; height:100px"></div>
<script type="text/javascript" charset='utf-8'>
var mPulisher = "1291";
var mMedia = "32782";
var mSection = "806596";
var pburl = "https://www.mobwithad.com/api/v1/banner/app/pluspointzone?zone=10882286&count=1&w=320&h=100&pb=MEZZOM&adid=c78502c5-17b8-41a7-a395-1bd015dddb39";
var width = "320";
var height = "100";
var adid="c78502c5-17b8-41a7-a395-1bd015dddb39";
var passback = function(target) {
var div = document.getElementById(target);
if (div) {
var ifr = document.createElement("iframe");
ifr.setAttribute("id", target + "_iframe"),
ifr.setAttribute("frameborder", "0"),
ifr.setAttribute("allowtransparency", "true"),
ifr.setAttribute("hspace", "0"),
ifr.setAttribute("marginwidth", "0"),
ifr.setAttribute("marginheight", "0"),
ifr.setAttribute("scrolling", "no"),
ifr.setAttribute("vspace", "0"),
ifr.setAttribute("width", width),
ifr.setAttribute("height", height);
ifr.setAttribute("src", pburl),
div.appendChild(ifr);
}
};
function adStart() {
var mezzo_ad = new MezzoAD();
var targetId = "adArea";
mezzo_ad.setView(targetId, {
"async": false,
"close_btn": {
"show": true,
"location": "3",
"images": "<https://advimg.ad-mapps.com/sdk/M_PLUS/Image/script/inter/close.png>"
}
});
mezzo_ad.setArea(true, 100);
var codes = {
"adid": adid,
"mPublisher": mPulisher,
"mMedia": mMedia,
"mSection": mSection,
"uAgeLevel": "1",
"keyword": ""
};
mezzo_ad.request(codes, {
success: function(type, status, data) {
console.log("[SUCCESS] type : " + type + " status : " + status + " data : " + JSON.stringify(data));
},
fail: function(type, status, data) {
console.log("[FAIL] type : " + type + " status : " + status + " data : " + JSON.stringify(data));
passback(targetId);
},
event: function(type, status, data) {
console.log("[EVENT] type : " + type + " status : " + status + " data : " + JSON.stringify(data));
}
});
}
adStart();
</script>
</body> |