How to add white space to the option text
How to add white space(s) to the option text?
<select id="sel">
<option value=""></option>
</select>
<script>
var text ="abc xyz";
var value ="val";
var contrlObj = document.getElementById("sel");
var newOpt = new Option(text,value);
contrlObj.options[0] = newOpt;
</script>
No matter how many spaces I inserted, it always displayed as: abc xyz.
What I intend to to is to display it as abc xyz with multiple white spaces. I tried abc xyz, and it displayed as abc xyz.
How can I do it?
Thanks to help.