How to get the id of all paragraph which are selected?

itaznalym

New Member
I am working with android webview and for achieving some functionality i need to integrate javascript. I am new to javascript to please tell me how to get the paragraphs id(id of each paragraph which are under selection). In more details:Like i am having data-\[code\]<p1 id="01">hhh dhghdg</p1><p2 id="02">dsdgs dhgd hdhd</p2>\[/code\]So you select some data i.e "hhh dhghdg dsdgs" so this data belongs to multiple paragraph p1 and p2 so i want to get the id of both the paragraph using javascript.Please tell me how to get this.
 
Back
Top