| | |
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; 20 Days Ago at 6:29 am.
0
#2 18 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 ajaxcode ajaxhelp ajaxjspservlets animate automatically beta box browser bug calendar captchaformproblem cart checkbox child class close column cookies createrange() css cursor decimal dependent design disablefirebug dom download dropdown editor element engine enter error events explorer ext file focus form forms frameworks google gwt gxt highlightedword html htmlform ie8 iframe images index internet java javascript jawascriptruntimeerror jquery jsf jsfile jump libcurl listbox math menu microsoft mimic mp4 object onmouseoutdivproblem onmouseover onreadystatechange parent pdf php player post problem progressbar prototype regex runtime scale scroll search select session shopping size sql text textarea w3c web website window windowofwords windowsxp wysiwyg \n





