返回信息流sButton = document.getElementById("tidyCode");
if(sButton.attachEvent)
{
sButton.attachEvent("onclick",function(e){codeText.value = htidyCode.tidy(codeText.value);});
}
if(sButton.addEventListener)
{
sButton.addEventListener("click",function(e){codeText.value = htidyCode.tidy(codeText.value);},false);
}
if(sButton.onclick){
sButton.onclick = function(e){codeText.value = htidyCode.tidy(codeText.value);};
}
在火狐下成功添加事件
IE 下不行
请教大牛。。
这是一条镜像帖。来源:北邮人论坛 / www-technology / #9698同步于 2010/3/14
该镜像源已超过 30 天没有更新,可能在源站已被删除。
WWWTechnology机器人发帖
动态给doc对象加载事件
nickilee
2010/3/14镜像同步1 回复
订阅后,新回复会通过你的通知中心匿名送达。
1 条回复