JavaScript does not have a specific function that will decode HTML objects, however you can assign a property innerHTMLto an element and then read it.
x = document.createElement('div');
x.innerHTML = ""test"";
console.log(x.innerHTML); // => "test"
This will work for any HTML objects, not just <
change
As indicated below, you are halfway through, you are using the wrong property.
Edit:
td_Details.innerText = location;
at
td_Details.innerHTML = location;
In the future, innerHTMLavailable in all browsers. innerTextno.
source
share