Set value of hidden input with jquery

前端 未结 7 914
忘了有多久
忘了有多久 2020-12-25 09:03

I\'m trying to set the value of the hidden field below using jQuery.


I\'m using

相关标签:
7条回答
  • 2020-12-25 10:04

    You don't need to set name , just giving an id is enough.

    <input type="hidden" id="testId" />
    

    and than with jquery you can use 'val()' method like below:

     $('#testId').val("work");
    
    0 讨论(0)
提交回复
热议问题