Add placeholder using javascript for a input field

If input field has an id “s” Then:

$(“#s”).attr(“placeholder”, “Search”);