Codice PHP:
document.getElementById('div').appendChild(document.createTextNode("<input type='button' value='ola'/>"));