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

150
Views
¿Cómo usar javascript simple para obtener el valor de la celda vecina al hacer clic en una celda de la tabla?

Creo un jsp. Llamará a AJAX y creará una tabla basada en los datos devueltos. La tabla incluye un cuadro de texto.
Ahora quiero agregar un evento de cambio para el cuadro de texto, comparará su valor con una celda vecina, escribí la función pero no sé cómo obtener el valor de la celda.

 <script language="javascript"> function btnclickdwr() { var cellFuncs = [ function(data) { return data.matnr; }, function(data) { return data.amt; }, function(data) { return "<input onchange='check_available()' value='" + data.menge + "'></input>"; } } ]; var p1=document.getElementById(P1).value; getAMT.Query(p1, function(data) { if (typeof window["DWRUtil"] == "undefined") { window.DWRUtil = dwr.util; } dwr.util.removeAllRows('openWinBody'); / DWRUtil.addRows("openWinBody", data, cellFuncs, { escapeHtml : false }) }) } function check_available() {} </script> <body> <input id="p1"> <button onclick='btnclickdwr()>click</button> <div class="divcss1"> <table id="SS" width="80%" style="border-collapse: collapse; margin: 0 auto; text-align: center;"> <thead> <tr> <th style="">material</th> <th style="">available amount</th> <th style="">withdraw amount</th> </tr> </thead> <tbody id="openWinBody"> </tbody> </table> </div> </body>

¿Alguna pista? Gracias.

about 4 years ago · Santiago Gelvez
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!