| View previous topic :: View next topic |
| Author |
Message |
sweoff
Joined: 18 Jan 2007 Posts: 1
|
Posted: Thu Jan 18, 2007 11:22 pm Post subject: 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? |
|
| Back to top |
|
 |
|
|
Kevin1991
Joined: 19 Jan 2007 Posts: 4 Location: Malaysia
|
Posted: Mon Jan 22, 2007 9:22 am Post subject: Re: Get Selected Items from HTML Listbox |
|
|
<select id="myselect" onchange="AddToString()">
<option value="1">One</option>
<option value="2">Two</option>
</select>
| Code: |
var str = ""
function AddToString(){
str += myselect.value + "~"
}
|
|
|
| Back to top |
|
 |
|