用attachEvent可以么?
===================================================================
SyntaxbSuccess = object.attachEvent(sEvent, fpNotify)ParameterssEvent Required. String that specifies any of the standard DHTML events.
fpNotify Required. Pointer that specifies the function to be called when sEvent fires. Return ValueBoolean. Returns true if the function is bound successfully to the event, or false otherwise.
===================================================================
SyntaxbSuccess = object.attachEvent(sEvent, fpNotify)ParameterssEvent Required. String that specifies any of the standard DHTML events.
fpNotify Required. Pointer that specifies the function to be called when sEvent fires. Return ValueBoolean. Returns true if the function is bound successfully to the event, or false otherwise.
var oE=document.createElement("<div>imafool comming.</div>");
oE.onclick=function(){alert(this.innerText);};
document.body.appendChild(oE);
</script>
oEl.innerHTML=XXXXX
oEl.attechEvent("onclick",fun);
document.body.appendChild(oEl);
var Obj=document.createElement("DIV");
Obj.onmouseover="MouseOverEvent()";
Obj.onmouseout="MouseOutEvent()";
document.body.appendChild(Obj);
function MouseOverEvent()
{
}
function MouseOutEvent()
{
}
</script>