tags:

views:

459

answers:

2

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?

+3  A: 

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.

devio
+2  A: 

Use OnClick.

:select only applies to some form elements.

Oli