I'm just a beginner. And I'm trying to use innerHTML
.
I think I wrote proper code, but it doesn't work.
When I click the trigger, the page becomes white and showing the statut : 'connecting'
I don't know where is the problem
Please someone help me.
Here are my codes.
HTML CODE
<div class = "head">
<nav>
<a onClick="open()">
<div class = "body">
<div class = "bodyL">
<div class = "newsPnT">
JAVASCRIPT CODE
function open() {
document.getElementsByClassName('newsPnT').innerHTML = "asdfasdfasdf";
}
What is the problem with my code?
PS: I'm using Firefox Aurora. When I click the trigger, the 'debugger > sources' says, 'waiting for sources.'
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…