代码:
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>test</title>
<link rel="stylesheet" href="./style.css">
</head>
<body>
<div class="box" id="aa">123aaaaaasdasdsadsadsadsadsadassssssssssssssssdasdasdasdasdasdddddddddddddd
<div id="ee">444<div id="tt">555</div></div></div>
<script src="js/common.js"></script>
</body>
</html>
window.onload = function(){
var box = document.getElementById('aa');
addEvent(box,'click',function(){
alert('ysx');
});
addEvent(box,'click',toBlue)