| | |
List Items
Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Sep 2009
Posts: 13
Reputation:
Solved Threads: 0
HI,
I am dynamically generating a unordered list. I want to get value("somevalue") inside each <li> item. How can i access it please help me.
<ul>
<li value="somevalue" > item1 </li>
<ul>
Help me in using javascript or jsp to do the above.. thanx in advance
I am dynamically generating a unordered list. I want to get value("somevalue") inside each <li> item. How can i access it please help me.
<ul>
<li value="somevalue" > item1 </li>
<ul>
Help me in using javascript or jsp to do the above.. thanx in advance
Last edited by jaimca; 27 Days Ago at 6:29 am.
0
#2 25 Days Ago
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
<html> <head> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script> <script type="text/javascript"> $(document).ready(function() { $("li").each(function(i) { alert($(this).attr("value")); }); }); </script> </head> <body> <ul> <li value="1">item 1</li> <li value="2">item 2</li> <li value="3">item 3</li> </ul> </body> </html>
"If it is NOT source, it is NOT software."
-- NASA
-- NASA
![]() |
Similar Threads
- List items: pointing to a specific li (HTML and CSS)
- adding list items (Python)
- Removing an item from head of linked list (C)
- Sorting a List of Items (Java)
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: how to show a larger input field with mouseover?
- Next Thread: onmouseover on parent element
| Thread Tools | Search this Thread |
acid2 ajax ajaxexample ajaxjspservlets array beta box browser captchaformproblem cart child close codes column css date debugger decimal dependent design disablefirebug dom download element embed engine enter error events ext file firefox focus form forms frameworks getselection google gwt gxt hiddenvalue highlightedword hint html ie7 ie8 iframe index java javascript javascripthelp2020 jquery jsp jump libcurl listbox maps masterpage math media menu microsoft mimic mp4 onerror onmouseoutdivproblem onmouseover onreadystatechange paypal pdf php position post problem programming prototype rated rating redirect safari scale scriptlets scroll search security select software star starrating synchronous toggle unicode variables w3c web webservice window windowofwords xml \n





