get value of selected text

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • harpreet1433
    New Member
    • Oct 2006
    • 7

    get value of selected text

    how to get selected value of text from div in mozilla
  • ronverdonk
    Recognized Expert Specialist
    • Jul 2006
    • 4259

    #2
    When it is in a form, you can handle it using JS (or another language) when submitted. When you want to handle it immediately when clicked, you can use a JavaScript routine to get control and obtain the value via the DOM. Which method do you want to use?

    Ronald :cool:

    Comment

    • iam_clint
      Recognized Expert Top Contributor
      • Jul 2006
      • 1207

      #3
      Code:
      document.getElementById("divname").innerHTML

      Comment

      Working...