jquery Method for Determining If Placeholder Attributes Are Supported

  • 2021-07-16 01:38:29
  • OfStack

Examples are as follows:


//placeholder Compatibility 
function isPlaceholer(){
 var input = document.createElement('input');
 return "placeholder" in input;
}

The result of this function returns true or false


Related articles: