javascript clear input box code example Example: clear textbox js function name() { document.getElementById('elementid').value = ""; }