use getelement by id work in javascript and fetch values from database code example Example: getelementbyid document.getElementById("someid");