<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
<h1 class="mui-title">hello</h1></header><div class="mui-content">
<div style="padding:15px">
<button id='pickDateBtn' type="button" class="mui-btn">选择日期</button>
</div>
<div style="padding:15px">
<button id='pickTimeBtn' type="button" class="mui-btn">选择时间</button>
</div></div><script type="text/javascript">document.getElementById("pickDateBtn").addEventListener('tap', function() {
var dDate = new Date()
//设置当前日期(不设置默认当前日期)
dDate.setFullYear(2016, 7, 16)
var minDate = new Date()
//最小时间
minDate.setFullYear(2010, 0, 1)
var maxDate = new Date()
//最大时间
maxDate.setFullYear(2016, 11, 31)
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
})
})
document.getElementById("pickTimeBtn").addEventListener('tap', function() {
var dTime = new Date()
//设置默认时间
dTime.setHours(6, 0)
plus.nativeUI.pickTime(function(e) {
var d = e.date
mui.toast("您选择的时间是:" + d.getHours() + ":" + d.getMinutes())
}, function(e) {
mui.toast("您没有选择时间")
}, {
title: "请选择时间",
is24Hour: true,
time: dTime
})
})
得这么设置mui.ajax({
headers:{
}
})
mui.ajax(url, {
headers: {'Cookie':"JSESSIONID="+具体的Cookie.value},
data: params,
dataType: 'json', //服务器返回json格式数据
type: 'post', //HTTP请求类型
timeout: 10000, //超时时间设置为10秒;
success: suc,
error: err)
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)