<div class="container-fluid">
<div id="inputNumbers">
</div>
</div>
xxxxxxxxxx
label {
width: 80px;
text-align: right;
margin-right: 3px;
}
@font-face {
font-family: 'S-CoreDream-3Light';
src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_six@1.2/S-CoreDream-3Light.woff') format('woff');
font-weight: normal;
font-style: normal;
}
body {
margin: 20px;
font-family: 'S-CoreDream-3Light';
}
.container-fluid{
background-color:#ededed;
padding:10px;
border-radius:10px;
}
xxxxxxxxxx
document.readyState === 'complete' ? init() : window.onload = init;
//
function init() {
// 여러 InputNumber 컨트롤을 만들고 형식 지정
let parent = document.getElementById('inputNumbers'), template = '<div class="form-group">' +
'<label for={id}>Step {step}: </label>' +
'<input id={id}>' +
'</div>';
//
['n0', 'n2', 'c0', 'c2', 'p0', 'p2'].forEach((fmt, i) => {
let id = 'theInputNumberF' + fmt, step = fmt[0] == 'p' ? 0.1 : (i + 1), html = wijmo.format(template, {
fmt: fmt,
id: id,
step: step
});
//
parent.appendChild(wijmo.createElement(html));
let theNumber = new wijmo.input.InputNumber('#' + id, {
format: fmt,
step: step
});
});
}