mikina
5/3/2013 - 12:43 PM

Quick and dirty placeholder text in JS

Quick and dirty placeholder text in JS

function checkclear(what){
  if(!what._haschanged){
		what.value='';
	}
	what._haschanged=true;
}


<input onfocus="checkclear(this)" />