function chkdiv(divid){ var chkid=document.getElementById(divid); if(chkid != null){return true; } else {return false; } } if (chkdiv('fy')){ document.getElementById('fy').innerHTML='上一篇:精品课件:语文旧人教必修2 下一篇:精品学案:语文旧人教必修2 '; }