易截截图软件、单文件、免安装、纯绿色、仅160KB

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()


相关文档:

js javascript:void(0) 真正含义

我想使用过ajax的都常见这样的代码:
<a href="javascript:doTest2();void(0);">here</a>
但这儿的void(0)究竟是何含义呢?
Javascript中void是一个操作符,该操作符指定要计算一个表达式但是不返回值。
void 操作符用法格式如下:
1. javascript:void (expression)
2. javascript:void expression
expr ......

What can a JavaScript do?


JavaScript gives HTML designers a programming tool - HTML authors are normally not programmers, but JavaScript is a scripting language with a very simple syntax! Almost anyone can put small "snippets" of code into their HTML pages
JavaScript can put dynamic text into an HTML page - A Ja ......

javascript keycode大全

    IE   event.keyCode
keycode    8 = BackSpace BackSpace
keycode    9 = Tab Tab
keycode   12 = Clear
keycode   13 = Enter
keycode  &nb ......

javascript 客户端 生成 MD5值

最近太忙,没有时间总结工作内容了,忙里偷闲吧,共享下我的JavaScript MD5 脚本
 var hex_chr = "0123456789abcdef";
function rhex(num)
{
str = "";
for(j = 0; j <= 3; j++)
str += hex_chr.charAt((num >> (j * 8 + 4)) & 0x0F) +
hex_chr.charAt((num >> (j * 8)) & 0x0F);
re ......

javascript: The Browser Object Model(BOM)

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 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号