Come faccio ad unire php con javascript (document.getElementById())?

Puoi fare un esempio di quello che hai detto?