2007-12-21 11:34 | Posted by Sunshow | Filed Under WebDev
操作iframe中的DOM元素,有两个注意点: 1、必须先获取指定iframe的document; 2、对于1,必须在页面load完以后才能获取; 举例说明: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>操作iframe中的DOM元素</title> <script type="text/javascript"> <!-- //返回指定iframe的document function getIFrameDocument(aID) { var rv = null; if (document.getElementById(aID).contentWindow.document){ // if contentDocument exists, W3C compliant (Mozilla) rv = document.getElementById(aID).contentWindow.document; [...]
2006-09-09 14:25 | Posted by Sunshow | Filed Under
正则表达式语法 Apache HTTP Server Version 2.2 文档 Html/Javascript/CSS Online Documents jQuery Docs - 1.1.2 API Struts Taglib Reference Visual jQuery 1.1(中文版) W3Schools Online Web Tutorials 中文版 标签:api, document, javascript, jQuery, 文档, 正则表达式 相关日志 看上去不错的日期控件 (1) 计算element相对于父容器的偏移量 (1) Firebug (1) 第一个C++程序 (7) IE、pre、innerHTML (3)
Recent Comments