<! DOCTYPE html>
>
>
<meta CharSet="UTF-8">
<title></title>
<style type= "Text/css">
Div{
width: px;
height: px;
margin: px;
float: left;
Border: 1px solid orange;
}
</style>
>
<body>
<div id="Div1" >1</div>
<div id="Div2" >2</div>
<div id="Div3" >3</div>
<div id="Div4" >4</div>
<div id="div5" >5</div>
<div id="Div6" >6</div>
<div id="Div7" >7</div>
<div id="Div8" >8</div>
<div id="div9" >9</div>
<div id="div10" >10</div>
</body>
<script type= "Text/javascript">
Requirement: Even pop-up window
for (var i=1; i<=; i++) {
//Get div
var div=document.getElementById ("div"+i);
//Get div content and convert to data type
var num=number (div.innerhtml);
if (num%2= =0) {
//The function body corresponding to the Click event Binding of the div that satisfies the condition
Div.onclick=function() {
alert ("popo,coming!" );
}
}
}
</script>
>
JS, judging the popup window according to the DIV value