JavaScript Programming
Jump to navigation
Jump to search
Hints and tips for Javascript programming.
- Deleting options in a select element (in a form):
document.my_form.my_select.options[index] = null;
Note that this syntax probably also works for other arrays of objects (untested yet, though).
- Outputting quickly (for debugging) an array:
alert(my_array);
will display all the elements of the array, separated by commas.