+ 1
InnerHtml can smb clarify ?
2 Respuestas
+ 3
it is DOM.
Lets say there is a paragraph you want to change its content by event.
<p id="priceTag" >$50</p>
<button onclick="changePrice">Click</button>
<script>
function changePrice (){
var x = document.getElementById("priceTag");
x.innerHTML="$35";
}
</script>
https://code.sololearn.com/WkFu0PqDX01Y/?ref=app
+ 2
gooD