javascript - format text inside drop down box -
I am currently trying to get a code and the full name of a specialty formatted and displayed in the drop-down box I already have the code to display two values, but they are not formatted. The problem is that not all characters will consume equal amounts of space. Codes or letters can be included in the code.
Render: function () {this. $ El.attr ('value', this.model.get ('ptTimeCd')) Html (this .model.get ('ptTimeCd') + "& amp; nbsp; & amp; nbsp; + this.model.get ('ptTimeName')); this return;} < P> It produces a drop down like something: A1 | Some text is CM | Some more text is GB ... |
There is no such way Can I align them all so that the vertical always remain in one place?
I understand correctly, then there is a problem with your nature
.mono {font-family: "courier new", courier, fixed, monospace;} Then your drop-down list items Apply the CSS class in and see if you get something else you want to achieve.
Then just make sure that each section of your item has the same amount of character and space. , Which is a relatively simple programming logic exercise where you can use the length of the string Allow each section to pad or trim. If you need help with that particular part ask again.
Comments
Post a Comment