How I paas blank space in .val()? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How I paas blank space in .val()?

$("#id").val()....How to paas blank space in this??

8th Nov 2019, 12:08 PM
Saumil Trivedi
Saumil Trivedi - avatar
3 Answers
+ 3
it's simple. Do like this $("#id").val(" "); Another example: $("#id").val("A" + " " + "J");
8th Nov 2019, 12:53 PM
A͢J
A͢J - avatar
+ 3
And if this doesn’t work, try add CSS rule: white-space: pre;
8th Nov 2019, 1:38 PM
Tomáš Wróbel
Tomáš Wróbel - avatar
0
If you want to pass empty space just by adding double quote inside $("#id").val(" ");
8th Nov 2019, 1:04 PM
Ahmad Hamdan
Ahmad Hamdan - avatar