Monday, March 7, 2011

Onselect event doesn't fire on div

Hello,

I have been unable to trigger an onselect event handler attached to a <div> element. Is it possible to force a <div> to emit select events?

From stackoverflow
  • According to w3schools, onSelect is only defined on input and textarea objects.

    You may however try to catch the MouseUp event and retrieve the selected text in the current window/document.

  • Use OnClick.

    :select only applies to some form elements.

0 comments:

Post a Comment