JSFiddle - React, Tailwind, and code Playground
HTML
<input type="text" placeholder="asdfasdf" value="asdfasdf"/>
JavaScript
$.fn.pVal = function(){
var $this = $(this),
val = $this.eq(0).val();
if(val == $this.attr('placeholder'))
return '';
else
return val;
}
$(function(){
alert($('input').val())
alert($('input').pVal())
});