Hey I have div that is editable and I need to know when the div is in focus and when its leaving focus. how do I do it?

<div onblur="alert('You left the div!');" onfocus="alert('You focussed the div!');" style="width:300px; height:200px;"></div>

~G

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.