Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

77
Views
Establecer el valor de la entrada oculta con jQuery

Estoy tratando de establecer el valor del campo oculto a continuación usando jQuery.

 <input type="hidden" value="" name="testing" />

Estoy usando este código:

 var test = $("input[name=testing]:hidden"); test.value = 'work!';

Pero no funciona. ¿Qué pasa con mi código?

over 4 years ago · Santiago Trujillo
3 answers
Answer question

0

Debe usar val en lugar de value .

 <script type="text/javascript" language="javascript"> $(document).ready(function () { $('input[name="testing"]').val('Work!'); }); </script>
over 4 years ago · Santiago Trujillo Report

0

Esto funcionó para mí:

 $('input[name="sort_order"]').attr('value','XXX');
over 4 years ago · Santiago Trujillo Report

0

$('input[name="testing"]').val(theValue);
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!