Code: Select all
$("#theh2").text($("#theinput").val());
Code: Select all
$("#theh2").text($("#theinput").val().replace(" ", " ");
"This and That" becomes "This and That"
This is clearly not what I intended. Why isn't the [ ]s working?
I appreciate someone making sense out of this.
Thanks for reading.