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

180
Views
¿Por qué mi función "onChange" no funciona?

 export function UpdateData(props){ return( <div> <div className='updateForm'> <form> <div className="form-group"> <label>Your ID:</label> <input name="id" type="text" defaultValue={props.usersData._id} autoComplete="off" className="form-control" readOnly></input> <label>Enter your name:</label> <input name="name" type="text" defaultValue={props.usersData.name} autoComplete="off" placeholder="Enter your name here....." className="form-control" onChange={(e)=>console.log(e.target.value)}></input> <label>Enter your age:</label> <input name="age" type="text" defaultValue={props.usersData.age} autoComplete="off" placeholder="Enter your age here....." className="form-control" onChange={(e)=>console.log(e.target.value)}></input> <label>Enter your city:</label> <input name="city" type="text" defaultValue={props.usersData.city} autoComplete="off" placeholder="Enter your city here....." className="form-control" onChange={(e)=>console.log(e.target.value)}></input> <br/> <button className="btn" id="myButton2">Save Update</button> </div> </form> </div> </div> ) }

Quiero consolar los cambios del campo de entrada, pero la función "onChange" no funciona en consecuencia. He usado document.getElementById("updateCont").innerHTML=ReactDOMServer.renderToString(); para enviar los datos.

about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

¿Ha intentado declarar una función handleChange y luego establecerla en el atributo onChange?

about 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!