Hi i have a textbox which i am using as a counter to show how many characters are still allowed in another textbox. I have made it read only and its background transparent so that you cant tell it is a select box. The only problem is you can still click on it or tab to it. Is there a way to do this so it appears just like normal text and people cant click on it or tab to it?
Share
Just replace the
inputelement with aspanelement or some other non-input element. This requires a trivial change to your JavaScript; you would assign to theinnerHTMLproperty of the element rather thanvalue. Then the content will appear as normal text, and you can style it as desired.