I want get userID value for each form separately using javascript api.
I tried :
<form >
<input list="browsers" id="${childSnapshot.val().orderid}" >
<datalist id="browsers">
<option value="Order Pending">
<option value="Order Confirmed">
<option value="Order Shipped">
<option value="Order Delivered">
</datalist>
</form>
<input id="${childSnapshot.val().orderid}" value="${childSnapshot.val().userID}"
<button id="${childSnapshot.val().orderid}" onclick="reply_click(this.id)" style="padding:1px">Update</button>
function reply_click(clicked_id){
let valueitem = document.getElementById(clicked_id).value;
var orderid = clicked_id;
console.log(orderid+valueitem)
}
The result i'm getting Order id and the option value, but userID its not coming how to fix it ?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…