codecamp

mip-ad 广告

mip-ad 用来支持站长添加网页内自定义广告,主要包括连接、图文,多图,banner四种形式,这类广告可以制定大小也可以被用户关闭。

标题内容
类型通用
支持布局responsive
所需脚本https://mipcache.bdstatic.com/static/v1.4/mip-ad.js
版本v1.0支持别名mip-embed

示例

通用广告banner样式基本使用

<mip-ad 
    type="ad-comm"
    tpl="onlyImg" 
    href="//m.baidu.com/s?word=百度" 
    data-size="1242 180" 
    src="//m.baidu.com/static/search/ala/ad_1.png">
</mip-ad>

使用别名

<mip-embed
    type="ad-comm"
    tpl="onlyImg" 
    href="//m.baidu.com/s?word=百度" 
    data-size="1242 180" 
    src="//m.baidu.com/static/search/ala/ad_1.png">
</mip-embed>

支持广告

  • 通用广告
  • 全网广告
  • 网盟广告
  • 网盟扩展广告
mip-stats-tianrun 天润统计
MIP ad-baidu 网盟广告
温馨提示
下载编程狮App,免费阅读超1000+编程语言教程
取消
确定
目录

MIP 帮助

关闭

MIP.setData({ 'pageTheme' : getCookie('pageTheme') || {'day':true, 'night':false}, 'pageFontSize' : getCookie('pageFontSize') || 20 }); MIP.watch('pageTheme', function(newValue){ setCookie('pageTheme', JSON.stringify(newValue)) }); MIP.watch('pageFontSize', function(newValue){ setCookie('pageFontSize', newValue) }); function setCookie(name, value){ var days = 1; var exp = new Date(); exp.setTime(exp.getTime() + days*24*60*60*1000); document.cookie = name + '=' + value + ';expires=' + exp.toUTCString(); } function getCookie(name){ var reg = new RegExp('(^| )' + name + '=([^;]*)(;|$)'); return document.cookie.match(reg) ? JSON.parse(document.cookie.match(reg)[2]) : null; }