Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Converting a text input to a select with JavaScript

DZone's Guide to

Converting a text input to a select with JavaScript

·
Free Resource

 Sometimes you need the page dimanically changes a texbox with a dropdown box. On the example below we show you how to perform this work. The first way demonstrates how to do this with remove() and append() jQuery methods and the second shows how to perform the same work with replaceWith() method.

 
Topics:

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}