1. 程式人生 > >如何用jquery獲取input輸入框中的值?

如何用jquery獲取input輸入框中的值?

如何用jquery獲取<input id="test" name="test" type="text"/>中輸入的值?
$(" #test ").val()
$(" input[ name='test' ] ").val()
$(" input[ type='text' ] ").val()
$(" input[ type='text' ]").attr("value")