Answers for "how to empty an element in javascript"

5

javascript clear div

//using javascript
document.getElementById(elementID).innerHTML = "";

//using JQuery
$('#elementID').html('');
Posted by: Guest on June-11-2020
1

how to empty an element in javascript

function clearBox(elementID)
{
    document.getElementById(elementID).innerHTML = "";
}
//seems like there is no built in funciton's but in jquery 
$(element).empty();
Posted by: Guest on April-30-2021
0

clear a div

$("#yourDiv").html(""); // jQuery
Posted by: Guest on July-28-2020

Code answers related to "how to empty an element in javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language