I have this is html:
<script>
function decode(str) {
return decodeURI(str);
}
</script>
<span>decode('Alma%20k%C3%B6rte%20di%C3%B3')</span>
Why it is not get called?
>Solution :
HTML is a markup language and does not directly execute programmatic code as part of document content.
You can execute JS code in a <script> tag and use DOM methods to manipulate the document
<script>
function decode(str) {
return decodeURI(str);
}
</script>
<span></span>
<script>
// locate the <span> element and update its `textContent` property
document.querySelector("span").textContent =
decode('Alma%20k%C3%B6rte%20di%C3%B3')
</script>