我有一個表單中的數字字段,我想接受多個句點。該字段將用於輸入軟件版本號。我只能輸入一段時間的代碼。一旦我在場上添加兩個句點,我會收到錯誤消息。這是我正在使用的代碼。 我正在使用表單生成器。並可以添加Javascript和CSS。我不能編輯的HTML或PHPjquery允許數字段接受多個句點
$('.decimal input').numeric({allow:"."});
<div class="decimal">
<label class="description" >Version Number (must be a number) <span class="required">*required</span></label>
<div>
<input class="element text small" type="text" value="">
</div>
</div>
你會得到什麼錯誤? –
我在添加兩個句點時遇到的錯誤是「此字段必須是數字」 – nicban
他正在使用[numeric.js](https://github.com/SamWM/jQuery-Plugins/tree/master/numeric/) –