2015-02-24 76 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