Technically, you do not need to run the onload function to clear it - you can just put javascript directly on the page. For instance:
document.getElementById("mytextinput").value = ''
or using jQuery
$("mytextinput").val('');
, dom, , javascript dom. , jQuery ,
$(document).ready(function() {
$("mytextinput").val('');
});