Jump to content

how to get selected class in div value java script


zohab

Recommended Posts

Hi,

 

I want to get selected class in div java script. how can i get it.

 

following is the code of div

 

<div id="" class="ui-accordion">

<div class="groupdiv"><div>
<div class="title"></div>

<div class="groupdiv selected"><div>
<div class="title selected"></div>

<div class="groupdiv"><div>
<div class="title"></div>

</div>

I mean,what could be the statement in javascript to get value between div

<div class="title selected"></div>

function check_custom_data() {

alert(document.getElementById('groupdiv').value) ;
alert(document.getElementById('title selected').value) ;
alert(document.getElementTagName('.title selected').value) ;


}

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.