| You are here: DEVPPL ‹ Forum ‹ Programming ‹ JavaScript Forum |
NOTIFICATIONS
|
|
|||||||||||||||
Login |
Get Selected Items from HTML Listbox
2 posts
• Page 1 of 1
0
Get Selected Items from HTML Listbox
I'm trying to the selected items from a HTML list box and add them to a string and seperating them with an "~". Can help with this?
- Sweoff
- Reputation: 0
- Posts: 1
- Joined: Thu Jan 18, 2007 11:18 pm
- Highscores: 0
- Arcade winning challenges: 0
Get Selected Items from HTML Listbox - Sponsored results
- Sponsored results
0
<select id="myselect" onchange="AddToString()">
<option value="1">One</option>
<option value="2">Two</option>
</select>
<option value="1">One</option>
<option value="2">Two</option>
</select>
- Code: Select all
var str = ""
function AddToString(){
str += myselect.value + "~"
}
- Kevin
- Reputation: 0
- Posts: 4
- Joined: Fri Jan 19, 2007 9:22 am
- Location: Malaysia
- Highscores: 0
- Arcade winning challenges: 0
|
|