Click here to Skip to main content
15,887,683 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i have 2 textbox where first textbox i type anything like "helleo how are you"

onchange evnent of first textbox i required fist all char of string in second textbox.


example.

textbox1 = Unicode optical charter recognition

texbox2 = UoCr (output) i required on change event of firsttextbox.all first char of string.

What I have tried:

jQuery('#textbox1').on('input', function() {



});
Posted
Updated 30-Oct-17 10:01am
Comments
Bryian Tan 30-Oct-17 15:15pm    
Where the rest of the code? :)

1 solution

Here something that should help you get going CP_GetAllFirstLetter - JSFiddle[^]

JavaScript
var str = " Unicode optical Charter recognition"; 
var flRegex = str.match(/\b(\w)/g);

Output: UoCr

Reference: javascript - Return First Character of each word in a string - Stack Overflow[^]
 
Share this answer
 
Comments
Karthik_Mahalingam 31-Oct-17 1:31am    
5
Bryian Tan 31-Oct-17 2:07am    
Thanks :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900