I know that this question is so noob . but I want to know that how to get the first letter from the entered word in an input text.
I don't know about it .but please guide me about that .
The native Javascript substr()
method can do that:
var firstChar = $('#textbox').val().substr(0, 1);
The first argument is the character position to start from, the second is the length to take.
MDN Docs
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With