<input type="text" class="form-control" id="ly" name="ly" placeholder="版次号" onkeyup="this.value=this.value.replace(/[^\d\.\d{0,2}]/g,'')">
<input type = "text" name= "price" id = 'price' onkeyup= "if( ! /^d*(?:.d{0,2})?$/.test(this.value)){alert('只能输入数字,小数点后只能保留两位');this.value='';}" />
<input type = "text" name = "number" id = "number" required pattern="\d*\.\d{2}" />