Add placeholder using javascript for a input field

  • 0

If input field has an id “s” Then:

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

If input field has an id “s” Then: $(“#s”).attr(“placeholder”, “Search”);

If input field has an id “s” Then: $(“#s”).attr(“placeholder”, “Search”);