We would like to know how to clone node.
<!DOCTYPE html>
<html>
<body>
<select id="sel0">
<option>one</option>
<option>two</option>
<option>three</option>
</select>
<script type='text/javascript'>
<!-- w w w .ja v a2 s. c o m-->
var select = document.getElementsByTagName('select');
var dupeSelect = select[0].cloneNode(true);
dupeSelect.id = 'sel1';
document.body.appendChild(dupeSelect);
</script>
</body>
</html>
The code above is rendered as follows: