Yochi,
<!DOCTYPE HTML>
<html>
<head><meta charset='utf-8'></head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script>
<style>
input {
display: block;
}
.red {
background: red;
}
.blue {
background: blue;
}
.green {
background: green;
}
li {
color: #fff;
list-style: none;
padding: 0 0 0 10px;
margin: 0 0 15px 0;
width: 100px;
cursor: pointer;
}
ul {
display: none;
}
</style>
<script>
$(document).ready(function() {
$('#button').click(function() {
$('ul').css('display','block');
});
$('ul li').click(function(event) {
var block = $('<input/>',{type:"text",value:"1",name:"id[]"} ).addClass($(this).attr('class'));
$('body').append(block);
$('#menuTypeItem').css('display','none');
});
});
</script>
<body>
<input type="submit" value="Добавить" id="button">
<ul id='menuTypeItem'>
<li class="red">красный</li>
<li class="blue">синий</li>
<li class="green">зеленый</li>
</ul>
</body>
</html>