![]() | |
| |||||||
| Home | Register | Blogs | FAQ | Members List | Calendar | Downloads | Arcade | Mark Forums Read |
| Web Development Java/PHP/Perl/ASP and more |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| | #1 |
| Web developer | JavaScript: working with forms I have such situation: I have <select name="sel"></select> form element. Now I want to add an option with help of JavaScript, and write text there. It should be something like this --- document.forms[0].sel.addOption (addOption@ indzanic em horinel, et dzev method chka) document.forms[0].sel.options[Novy Option ID].text = "Privet"; --- |
| | |
| | #2 |
| Web developer | Inqs gta ![]() document.forms[0].sel.options[document.forms[0].sel.length] = new Option("My New Text", "My New Value") |
| | |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Web forms | brake | Web Development | 8 | Jun 20, 2003 16:22 |
| JavaScript: How to get selected text of desired element name? | acid | Web Development | 1 | Jun 15, 2003 20:31 |
| JavaScript - Frames problem | Aram Ghazanchyan | Web Development | 9 | Jun 2, 2003 05:43 |
| cd-rom not working | A-Online | Hardware | 2 | Sep 20, 2002 17:08 |
| Kak spryatat Javascript | Mono | Web Development | 18 | Jun 9, 2002 01:53 |