How can I get the value by jquery ?

Hello guys..

I want to get a value "abc" below:

 

<div id="customfield_10700_EDIT_sqlfeed_main_div" style="width:100%;">
<input type="hidden" name="customfield_10700-nfeedispresent" value="field_there">

<select name="customfield_10700" style="display:none;" multiple="multiple">
<option value="abc">abc</option></select>

<div style="display:inline-block; width:100%;">
<div name="component"><div style="margin-top: 5px;"><span>abc</span><br></div></div>
<div name="errorDiv" class="debug-mode-error-div" style="display:none;"></div>
</div>

</div>

 

 

How can I get that value by jquery? 

 

 

1 answer

0 vote
Stephen Deutsch Community Champion Oct 11, 2015

If you already know the value, you can use this format:

이미 뭘 찾고 있는지 알면 이렇게 할 수 있고:

jQuery('option[value="abc"]').val();

or, if you want to get the first result of the select list, you could do it like this:

아니면 첫번제 뭔지 찾고 싶으면, 이렇게 할 수 있고요:

jQuery('select[name="customfield_10700"]').children().first().val();

근데 정확히 뭘 원하는지 좀 더 자세히 알려주시면 답을 더 잘 드릴 수 있습니다 ^^

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published 16 hours ago in Off-topic

Get to know our Atlassian User Group Leaders from Bengaluru, India

Meet @Dinesh Dhinakaran, @Vishnu Vasudeva, @Rajeev Verma, and Jamshid Nalakath: Our extraordinary AUG leaders from Bengaluru, India. These four work together to strengthen the bonds of their local co...

114 views 0 4
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you