<style>
/*在chrome下移除input[number]的上下箭头*/
input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{ -webkit-appearance: none !important; margin: 0;}/*在firefox下移除input[number]的上下箭头*/input[type="number"]{-moz-appearance:textfield;}
<style>
<input type="number" oninput="if(value.length>5)value=value.slice(0,5)">
时间: 2024-10-03 14:46:13