javascript 动态给IFRAME添加数据
<iframe width='100%' height='100%' name='boot' id='boot' src='' frameborder='0' scrolling='no'></iframe>
<SCRIPT LANGUAGE="JavaScript">
<!--
var iframe = window.frames['boot'];
iframe.document.open();
iframe.document.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\n');
iframe.document.write('<html xmlns="http://www.w3.org/1999/xhtml">\n');
iframe.document.write('<head>\n');
iframe.document.write('<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />\n');
iframe.document.write('</head>\n');
iframe.document.write('<body>\n');
iframe.document.write('请等待...');
iframe.document.write('</body>\n');
iframe.document.write('</html>\n');
iframe.document.close();
//-->
</SCRIPT>
iframe自适应高度
<iframe name="ifrName" src="targetName.htm" frameborder=false scrolling="auto" width="100%" height="100%" frameborder=no onload="document.all['ifrName'].style.height=ifrName.document.body.scrollHeight" ></iframe>
清空iFRAME中的内容用:iframename.location.reload()
相关文档:
我想使用过ajax的都常见这样的代码:
<a href="javascript:doTest2();void(0);">here</a>
但这儿的void(0)究竟是何含义呢?
Javascript中void是一个操作符,该操作符指定要计算一个表达式但是不返回值。
void 操作符用法格式如下:
1. javascript:void (expression)
2. javascript:void expression
expr ......
在silverlight开发中,我们可以使用js来调用silverlight中的方法(当然方法上要捆绑相应属性),也可以将指定
的js方法绑定到silverlight应用中的事件上.本DEMO演示了通过js调用完成silverlight数据列表控件(DataGrid)的数
据绑定操作,并通过DataGrid的EmployeeList_BeginningCellEdit事件将当前选取的数据行信息返回到 ......
版权声明:原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 、作者信息和本声明。否则将追究法律责任。http://gzycm520.blog.51cto.com/175220/36822
· 事件源对象 event.srcElement.tagName event.srcElement.type
· 捕获释放 event.srcElement.setCapture(); ......
window
window对象是浏览器或者框架自身.top总是浏览器,parent是父框架,self表示自己.
window通常可以省略.
窗口操作: moveBy(dx, dy), moveTo(x, y),
resizeBy(dw, dh), resizeTo(w, h).
导航: window.open(url, frame
name, attribute). attribute可以是left, top, height, width, resizable,
scrollable, too ......
DOM
节点类型的12个常量:
Node.ELEMENT_NODE
Node.ATTRIBUTE_NODE
Node.TEXT_NODE
Node.CDATA_SECTION_NODE
Node.ENTITY_REFERENCE_NODE
Node.ENTITY_NODE
Node.PROCESSING_INSTRUCTION_NODE
Node.COMMENT_NODE
Node.DOCUMENT_NODE
Node.DOCUMENT_TYPE_NODE
Node.DOCUMENT_FRAGMENT_NODE
Node.NOTATION_NODE
......