128
rated 0 times
[
129]
[
1]
/ answers: 1 / hits: 19957
/ 11 Years ago, sat, january 4, 2014, 12:00:00
I have a paragraph that I'd like to delete the contents of.
document.getElementById(id).innerHTML = ;
doesn't seem to be working. Does anyone have a better solution?
Here's an example
<!DOCTYPE html>
<html>
<head>
<script>
document.getElementById(p).innerHTML = ;
</script>
</head>
<body>
<p id=p>
words
</p>
</body>
</html>
but the words in the paragraph are not removed. Thanks in advance to anyone that can help.
More From » html