Clear Input Field Value When Selected by NicholasPhillips February 24, 2014 function clearDefault(el) { ย if (el.defaultValue==el.value) el.value = “” } // Then call this function using the ‘onfocus’ value of your input box: <input value=“Your Comment” onfocus=“clearDefault(this)” type=“text”> Tags:cleardefaultemptyhtmlinputjsonfocus