<?php header('Content-Type:text/html;charset=UTF-8')?>
<head>
<script>
function addSelect(){
var testdiv = document.getElementById('testdiv');
var myselect = document.createElement('select');
var myopt = document.createElement('options');
myopt.innerText = 'Первый';
myselect.appendChild(myopt);
testdiv.appendChild(myselect);
}
</script>
</head>
<body>
<div style="padding: 5px; border: 1px solid black" id="testdiv">
<button onclick="addSelect()">
Добавить список
</button>
</div>
|