Get the value in an input text box

前端 未结 12 743
你的背包
你的背包 2020-11-22 07:54

What are the ways to get and render an input value using jQuery?

Here is one:

12条回答
  •  野趣味
    野趣味 (楼主)
    2020-11-22 08:34

    To get the textbox value, you can use the jQuery val() function.

    For example,

    $('input:textbox').val() – Get textbox value.

    $('input:textbox').val("new text message") – Set the textbox value.

提交回复
热议问题