标签:body tag min utf-8 href border 微软 meta play
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<title></title>
<link href="css/mui.min.css" rel="stylesheet" />
<!--<link href="css/mui.dtpicker.css" rel="stylesheet" />-->
<script src="js/mui.min.js"></script>
<!--<script src="js/mui.dtpicker.js"></script>-->
<script type="text/javascript" charset="utf-8">
mui.init();
</script>
</head>
<body>
<div class="mui-content">
<div style="padding:20px;">
<button type="button" onclick="showDate();">徐文龙请你获取日期</button>
</div>
</div>
</body>
<script type="text/javascript">
function showDate() {
var dDate = new Date();
dDate.setFullYear(2016,10,24);
var minDate = new Date();
minDate.setFullYear(1950,2,3);
var maxDate = new Date();
maxDate.setFullYear(2040, 12, 1);
plus.nativeUI.pickDate(
function(e) {
var d = e.date;
mui.toast(‘徐文龙选择的日期是:‘ + d.getFullYear() + ‘-‘ + (d.getMonth() + 1) + ‘-‘ + d.getDate());
},
function(e) {
mui.toast(‘ 徐文龙没有选择日期‘);
}, {
title: ‘徐文龙选择日期‘,
date:dDate,
mindate: minDate,
maxdate: maxDate
}
)
}
</script>
此时间日期控件 只能在手机端 可以看到.在hbuilder上连接手机. 然后手机上可以看到. 手机上可以点击,非手机端不能点击,也看不到.这个hbuilder调用mui框架中的原生h5的方法浏览器上不能显示
标签:body tag min utf-8 href border 微软 meta play
原文地址:http://www.cnblogs.com/LFxanla/p/6901055.html