JSFiddle - React, Tailwind, and code Playground
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<select name="author" id="authors">
<<option>Пушкин</option>
<<option>Лермонтов</option>
<<option>Толстой</option>
</select>
<select name="book" id="books">
</select>
</body>
</html>
CSS
select{
width: 150px;
}
JavaScript
var authors = document.getElementById('authors').options;
var select = document.getElementById( 'books' );
var opt;
function CreateOption(val){
opt = document.createElement( 'option' );
opt.value = opt.text = val;
select.add( opt );
}
for(let i = 0; i < authors.length; i++){
if(authors[i].value =="Пушкин"){
CreateOption("Книга");
}
if(authors[i].value == "Лермонтов"){
CreateOption("Книга2");
}
}