Skip to main content
improved formatting
Source Link
Barun
  • 1.6k
  • 2
  • 14
  • 18

This will replace your existing mySelect with a new mySelect.

$('#mySelect').replaceWith('<Select id="mySelect" size="9"><optionsize="9">
   <option value="whatever" selected="selected" >text</option><option>
   </Select>');

This will replace your existing mySelect with a new mySelect.

$('#mySelect').replaceWith('<Select id="mySelect" size="9"><option value="whatever" selected="selected" >text</option></Select>');

This will replace your existing mySelect with a new mySelect.

$('#mySelect').replaceWith('<Select id="mySelect" size="9">
   <option value="whatever" selected="selected" >text</option>
   </Select>');
Source Link
Barun
  • 1.6k
  • 2
  • 14
  • 18

This will replace your existing mySelect with a new mySelect.

$('#mySelect').replaceWith('<Select id="mySelect" size="9"><option value="whatever" selected="selected" >text</option></Select>');