Why is it, when i click on my text with the onclick function in javascript, not working???
so basically, i tried to do a sort of thing where when you click on some text some more text would appear under it, so i tried this and it didn't work! what went wrong?
(Javasciprt file)
/* global $, document*/
// JavaScript Document and stuff ya know
//homepage
function angy() {
document.getElementById('me').src='Angy.png'
ang.textContent = "Ahmad A. oh no now he angy now"
}
me.onclick = angy;
//page 1
//page 2
// page 3
function whe() {
whydo.classList.remove('hidden');
document.getElementById('whydoe');
whydoe.classList.add('clicked');
}
whydoe.onClick = whe;
// page 4
// page 5
// page 6
(Main html page)
p class="" >
<span class="titilles">Web browsing?</span> <br><br>
Well its sometimes referred to as surfing the web but yeah! <br><br>
<span id="whydoe" class="clickable">No, I meant what is it?</span><br><br>
<span class="hidden" id="whydo">Oh, well it refers to the action of</span>
</p><br>
<p>
<span class="titilles">HTML? What does that stand for?</span> <br><br>
Well, HTML is the main programming language (although it may or may not be an actual programming langueage) used to make websites on the internet.
</p>
<script type="text/javascript" src="othermain.js"></script>
