如何用jquery获取<input id="test" name="test" type="text"/>中输入的值

1.$(" #test ").val()
2.$(" input[ name='test' ] ").val()
3.$(" input[ type='text' ] ").val()
4.$(" input[ type='text' ]").attr("value")

posted @ 2017-09-20 10:05  dthui  阅读(537)  评论(0编辑  收藏  举报