[color=red]button直接调用函数:[/color]onBlur="getname(this.value)"
[color=red]鼠标移动到链接上方调用函数:[/color]onMouseOver="hello()"
[color=red]日期:[/color]today = new Date(); date.getHours(); date.getMinutes();
date.getDate(); date.getMonth();date.getYear()
[color=red]随机数:[/color] today = new Date();
num = Math.abs(Math.sin(today.getTime()));
document.write("This is a random number:", RandomNumber());
[color=red]开启新窗口:[/color]msg=open();
msg.document.write("<HEAD><TITLE>哈 罗!</TITLE></HEAD>");
fr2调用同级fr1的hi()函数: onClick="parent.fr1.hi()"
[color=red]去除frame:[/color]
<a href="goaway.html" TARGET="_top">
head中 加 入<base target="_top">
相关资源:JavaScript基础笔记-尚硅谷视频自己总结