简体   繁体   中英

Want to edit the input date and time inside the table. But if I am typing the 1st number it suddenly get triggered

Want to edit the input date and time inside the table. But if Iam typing the 1st number it suddenly get triggered. Value should trigger after the date and time get entered.

The value will come inside the table. I need to edit the value inside the table. For example:

 function myFunction() { var x = document.getElementById("myInput").value; document.getElementById("demo").innerHTML = "You wrote: " + x; } 
 <input type="datetime-local" id="myInput" oninput="myFunction()"> <p id="demo"> </p> 

Make sure to distinguish between onkeyup and onchange correctly.

The first triggers change after pressing and releasing a key, the latter when taking focus away from input with an actual changed value.

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM