https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/Input
<input type="number" maxlength="3" size="12" placeholder="number" />
<input type="text" maxlength="3" size="12" placeholder="text" />
maxlength="3", size="12" 对 type="number" 不生效!
https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/Input
<input type="number" maxlength="3" size="12" placeholder="number" />
<input type="text" maxlength="3" size="12" placeholder="text" />
maxlength="3", size="12" 对 type="number" 不生效!
<input type="number" value="">
& document.getElementById("myNumber").value;
function myFunction() {
var value = document.getElementById("myNumber").value;
alert(value);
setNumX9('myNumber');
}
const setNumX9 = (id) => {
let input_param = `#${id}`,
num = document.querySelector(input_param);
console.log(`%c num`, `color: red`, num);
console.log(`%c num.value`, `color: red`, num.value);
console.log(`%c textContent`, `color: red`, num.textContent);
console.log(`%c num.innerText`, `color: red`, num.innerText);
console.log(`%c num.innerHTML`, `color: red`, num.innerHTML);
let showValue = num.value + '\n' + num.textContent + '\n' + num.innerText + '\n' + num.innerHTML;
console.log(showValue);
alert(showValue);
}
const datas = document.querySelectorAll('[data-good="saleNumber"]');
datas[1].value;
datas[1].value.length;
typeof(datas[1].value);
datas[1].value.length > 5 ? datas[1].value = parseInt(99999) : datas[1].value = parseInt(datas[1].value);
let input_value = document.querySelector(".ant-calendar-picker-input");
let key = input_value.getAttribute('value');
console.log(`input_value = ${key}`);
transform: scaleX(-1); & 左右翻转图片,镜像效果
https://gist.github.com/xgqfrms-GitHub/60379c11ef1f5a2d584b4960323f491c