I don't understand [object HTMLDivElement] what is this, an error?
Why not output the DIV?
<meta HTTP - equiv="content-type" Content="text/HTML. Charset=utf-8 "/& gt;
<style>
# div1 {
width: 100px;
height: 100px;
Background - color: black.
color: white;
}
</style>
<script>
Window. The onl oad=function () {
Var avc=document. GetElementById (" div1 ");
Document. The write (avc);
}
Var a=function () {
Alert (" good trapped!!!!!!!!!!! ");
}
(a);
</script>
<body>