<body>
<style>
div {
background: lightgreen;
border: solid 1px;
height: 200px;
width: 200px;
display: inline;
cursor: pointer;
}
</style>
<div>1</div>
<div>2</div>
<div>3</div>
<div>4</div>
<div>5</div>
<div>6</div>
<script>
window.onload = function () {
var mas = [];
document.body.onclick = function (e) {
e = e || event;
var target = e.target || e.srcElement;
if (e.ctrlKey == true) {
mas.push(target.innerHTML);
}
}
document.body.onkeyup = function (e) {
e = e || event;
if (e.keyCode == 17) {
alert(mas);
mas = [];
}
}
}
</script>