try
{
document.all("a").text="dd";
}
catch(ex)
{
notfound=true;
}
不知你的想法
正常是把代码放在onload中,控件一定存在