• Cursussen
  • Code Compiler
  • Discussiëren
  • Prijzen
  • Teams
Menu
+ 4

clear content of node

how do I clear the content of a div without remove the div?

htmljs
3rd Jan 2017, 9:30 AM
dan
1 Antwoord
+ 7
document.getElementsByTagName("div")[0].innerHTML = "";
3rd Jan 2017, 9:31 AM
Valen.H. ~
Valen.H. ~ - avatar

Heb je vaak vragen zoals deze?

Leer efficiënter, gratis:

  • Inleiding tot Python

    7,1 miljoen leerlingen

  • Inleiding tot Java

    4,7 miljoen leerlingen

  • Inleiding tot C

    1,5 miljoen leerlingen

  • Inleiding tot HTML

    7,5 miljoen leerlingen

Bekijk alle cursussen
Populair vandaag
Help
1 Votes
Python stressed me out
1 Votes
Can I get my banned account from sl back i got like 3 months banned/blocking
1 Votes
How often can you become a fully stuck developer?
1 Votes
Improve accessibility of this page
0 Votes
Course Doubt
1 Votes
Data analysis
0 Votes
[ReSolved] I paid for the subscription but didn't receive it.
0 Votes
If we already have the DELETE command in SQL, why do we need TRUNCATE?
1 Votes
How do i make a lexer and parser
1 Votes