So I have an input field, if it\'s blank, I want its value to be the words \"empty\", but if there is any value inputted, I want the value to be the inputted value. I want to us
If you're using pure JS you can simply do it like:
var input = document.getElementById('myInput'); if(input.value.length == 0) input.value = "Empty";
Here's a demo: http://jsfiddle.net/nYtm8/