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

245
Views
En la casilla de verificación, cambie el valor del cuadro de texto en la tabla de datos

Estoy usando tabla de datos. donde estoy haciendo la suma de todos los datos en la misma columna

Aquí está mi código

 { title: "New Price", data: "price", "render": function (data, type, row) { return ' <input type="checkbox" value="' + data + '" > <input type="number" id="newCost" class ="price-input" value="' + data + '" style="background-color:lightgoldenrodyellow;">'; } function doSum5() { var nodes = table7.column(3).nodes(); // get the value from each input field in each cell: var total = table7.column(3).nodes() // and then sum up the integer values: .reduce(function (sum, node) { return sum + parseFloat($(node).find('input').val()); }, 0); // place the sum in the relevant footer cell: var sum = parseFloat(total).toFixed(2) $(table7.column(3).footer()).html(sum); }

ingrese la descripción de la imagen aquí

El código funciona bien, ahora mi pregunta es cómo es posible que solo esos campos se seleccionen para la suma que está marcada para la casilla de verificación. por favor guíame

about 4 years ago · Juan Pablo Isaza
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!