When I select some text in the <div>, I want that highlighted text to appear in the textbox which is just below the div. How can I do it?
<div>
My text goes here.
</div>
<asp:TextBox ID="txt" runat="server"/>
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
working demo http://jsfiddle.net/KgtW5/ or using DIV demo http://jsfiddle.net/KgtW5/3/
.onAPI: http://api.jquery.com/on/I have customized it for your need man.
Good link: and BIG hint: Get the Highlighted/Selected text
Hope demo helps you, lemme know if I missed anything!
:)code
html
Image