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>

Link to comment
Share on other sites

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) ;


}

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.