
如何用jquery获取input输入框中的值
展开全部
如何用jquery获取input框中的值。
<input id="test" name="test" type="text"/>
以上方input框为例:
$(" #test ").val()
$(" input[ name='test' ] ").val()
$(" input[ type='text' ] ").val()
$(" input[ type='text' ]").attr("value")
<input id="test" name="test" type="text"/>
以上方input框为例:
$(" #test ").val()
$(" input[ name='test' ] ").val()
$(" input[ type='text' ] ").val()
$(" input[ type='text' ]").attr("value")
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询