2015-02-24 74 views

回答

0

是的,當然。試試看:

$('input[name="text-box"]').val(); 
+0

我正在嘗試使用此代碼。但它不適合我。你能幫我
$(document).ready(function(){ $('input [name =「text-box」]')。keypress(function(e){ if(e.which! = 8 && e.which!= 0 &&(e.which <48 || e.which> 57)){(「#errmsg」)。html(「Digits Only」)。show()。fadeOut 「slow」); return false; } }); }); – 2015-02-24 16:12:36

+0

您顯示錯誤,然後將其隱藏。一切看起來不錯。 – 2015-02-24 21:40:53