Click here to Skip to main content
15,886,578 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
http://jsfiddle.net/King_Fisher/yahmb8wq/1/[^]

I have created a fiddle for my question , In the fiddle i have a paragraph as
" Asp.net ,Ajax, Jquery,Javascript" , If i select only Ajax from those text and Click print button ,then it should show only the Ajax. How do i do that?
Posted
Comments
Kornfeld Eliyahu Peter 21-Apr-15 9:36am    
Where the JavaScript code is?
King Fisher 22-Apr-15 4:18am    
i don't know which method should use.
Kornfeld Eliyahu Peter 22-Apr-15 4:24am    
I didn't got you...
King Fisher 22-Apr-15 5:39am    
thanks,

1 solution

There is nothing in jQuery to handle it for you...
however plain JavaScript can help here - but of course IE before version 9 has all the problems you can get...
The key for this is getSelection()[^] method of the window object...

Updated jsFiddle: http://jsfiddle.net/yahmb8wq/2/[^]
 
Share this answer
 

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