I am trying to make text change to different text when a button is pressed and I’m not sure why it’s not working.
<p id="test"> A </p>
<button onclick = "test()"> Click </button>
<script>
function test(){
document.getElementById("test").innerHTML = "B";
}
</script>
>Solution :
Hi i just tried it and it’s working for me, A become B.
Is that and example of what you want to do or your actual code ?