<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<link rel="stylesheet" href="css/mui.css">
<link rel="stylesheet" type="text/css" href="css/app.css" />
<style>
html,
body {
background-color: #EEF2FD;
}
.mui-bar-nav{
background-color:#72C6F7;
}
.mui-bar-nav~.mui-content {
background-color: #EEF2FD;
padding: 30;
}
.mui-card .mui-control-content {
padding: 10px;
}
.mui-control-content {
height: 470px;
}
.mui-btn {
background-color: #74c544;
border-color:#74c544;
color: #FFFFFF;
}
.mui-popover {
height: 200px;
}
label{
color: #606467;
}
.mui-table-cell,
.mui-table-view-cell{
color: #606467;
}
</style>
</head>
<body>
<header class="mui-bar mui-bar-nav">
<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
<h1 class="mui-title" style="color: #FFFFFF;" >测试</h1>
</header>
<div class="mui-content">
<form id="inputform_report" class="mui-input-group">
<div class="mui-input-row" style="height: auto">
<label>处理结果</label>
<textarea id="mytextarea" class="mui-input-clear" rows="5" placeholder="请输入" ></textarea>
</div>
</form>
</div>
<script src="js/mui.min.js"></script>
<script src="js/mui.js"></script>
<script>
mui.plusReady(function(){
datainit();
});
mui.init({
gestureConfig:{
tap: true, //默认为true
longtap: true, //默认为false
}
});
function datainit(){
var reportdetail_form =document.getElementById('inputform_report');
var i = 0;
for(i=1;i<5;i++){
var div = document.createElement('div');
div.className = 'mui-input-row';
div.id = i;
div.innerHTML =
'<label id="labelshow">'+ i +'</label>' +
'<div class="mui-numbox" data-numbox-step="1" data-numbox-min="1" data-numbox-max="90">' +
'<button style="background-color:#73C6F8 ;" class="mui-btn mui-numbox-btn-minus" type="button">-</button>' +
'<input class="mui-numbox-input" type="number" value="'+ i +'" />' +
'<button style="background-color:#73C6F8 ;" class="mui-btn mui-numbox-btn-plus" type="button">+</button>' +
'</div>';
reportdetail_form.insertBefore(div,reportdetail_form.childNodes[0]);
}
mui('.mui-numbox').numbox();
}
</script>
</body>
</html>
5 个回复
DCloud_UNI_FXY
发一个完整的测试页面
Miss (作者)
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
</html>
Miss (作者)
这代码 发上来。。为什么是这样的。。没研究出来怎样发代码
我把完整的html的作为附件上传了
帮忙分析下。。麻烦了
DCloud_UNI_FXY
你同时引用了mui.js和mui.min.js
2016-02-02 16:46
Miss (作者)
我2了
已解决
三文鱼
遇到过一样的问题 动态初始化后 点击加减号步长是2 实际步长为1
解决方法是在body后引入相关js