codecamp

mip-html-os 操作系统

mip-html-os 用来支持页面内容元素区分OS显示

标题内容
类型通用
支持布局responsive,fixed-height,fill,container,fixed
所需脚本https://mipcache.bdstatic.com/static/v1.2/mip-html-os.js

示例

<mip-html-os os="android" class="mip-html-os"><p>This Is Android</p></mip-html-os>
<mip-html-os os="ios" class="mip-html-os"><p>This Is Ios</p></mip-html-os>

属性

os

说明:选择操作系统
必选项:是
类型:字符串
取值范围:android, ios

mip-form 表单
mip-lightbox 弹层
温馨提示
下载编程狮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; }