I have a table with several rows in which each td has a field, but I need to search for those tr containing the value "Egress" in a text_field. The value "Egress" is entered by the user and is not specified in the code.
I am trying something like this in coffeescript:
$('.payroll_novelties tr:has(.types[value="Egress"])').each ->
cantidad = $(this).find("td:eq(4) input")
valor = $(this).find("td:eq(5) input").val()
The code works for me but only if the value "egress" is in the code, but it does not work if it is typed by the user. How can I fix it?
I have found a solution as follows:
$('.payroll_novelties tr').each ->
if $(this).find("td:eq(3) input").val() == "Egress"
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.