1
如果您在字段上使用jquery驗證插件,您如何檢查用戶是否只輸入數字值?只允許在jquery驗證字段上的數字回覆
<script>
$(document).ready(function() {
$("#form1").validate();});
</script>
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" name="form1" id="form1" class="form1">
<input name="Capacity" type="text" id="Capacity" class="required">
<label for="Capacity" class="error">Please specify a capacity</label>
<input type="submit" name="Submit1" value="Search" id="Submit1" />
</form>