Input only shows/retains the first word
Input only shows/retains the first word
Why is my input only showing the first word of the data?
This question has an accepted answers - jump to answer
This discussion has been closed.
Why is my input only showing the first word of the data?
This question has an accepted answers - jump to answer
Answers
The problem is with how you have the double quotes. I find it easier to use single quotes for the string itself when you want double quotes to be within the string. I added a console log statement so you can see this. For example:
Since
Maria Gis not within quotes the HTML interpreter displays onlyMaria. You can inspect theinput, in your test case, to see how the HTML is built.I updated the return statement to use single quotes.
https://jsfiddle.net/fh901vea/
Kevin
Huh.
Thanks so much! I usually do the same thing, but I pulled that bit of code from an example and left well enough alone.
Thanks again!!!!