jsÈçºÎʵÏÖÔÚÒ³ÃæÍêÈ«¼ÓÔغóÖ´ÐÐjavascriptº¯Êý
jsÈçºÎʵÏÖÔÚÒ³ÃæÍêÈ«¼ÓÔغóÖ´ÐÐjavascriptº¯Êý»ò/´úÂëÄØ?
¿ÉÒÔÊÇÒÔϼ¸ÖÖ
<body onload="function name()" > </body >
<script >window.onload=function name </script >
<script language="javascript" for="window" event="onload" >function name(); </script >
µÚ¶þÖÖÖ»ÄÜдÈëÒ»¸öº¯Êý£¬¶øÇÒÎÞ·¨¸ø±äÁ¿£¬ÆäÖÐ×îºÃÓõÄÊÇ×îºóÒ»ÖÖ£¬¿ÉÒÔ¶ÀÁ¢Ð´³öÀ´£¬Ôõôд¶¼ÐС£
-------------------------------------------------------------------------------------
µÚ¶þÖÖÖ»ÄÜдÈëÒ»¸öº¯Êý-->¿ÉÒÔÕâô×ö:
1.ÄäÃûº¯Êý:
window.onload=function()
{
func_a();//º¯Êýa
func_b();//º¯Êýb
func_c();//º¯Êýc
}
2.´´½¨addLoadEventº¯Êý:
function addLoadEvent(func)
{
var oldOnload=window.onload;
if(typeof window.onload !='function')
{
window.onload=func;
}
else
{
window.onload=function()
{
oldOnload();
func();
}
}
}
ÒÔÏ¿ªÊ¼µ÷ÓÃ
±ÈÈçÓк¯Êýfunc_a(),func_b(),func_c(),Ôò:
addLoadEvent(func_a);
addLoadEvent(func_b);
addLoadEvent(func_c);
¸Ãº¯ÊýÓÉSimon Willison±àд,ËüÖ»ÓÐÒ»¸ö²ÎÊý,¸Ã²ÎÊý±íʾ±»µ÷Óõĺ¯ÊýÃû(ÔÚÒ³Ãæ¼ÓÔØÍê±ÏʱִÐеĺ¯ÊýµÄÃû×Ö).
Ïà¹ØÎĵµ£º
<html>
<head>
<meta name=vs_targetSchema content="http://schemas.microsoft.com/intellisense/ie5">
<title>***WSOFT.NET***</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<!--media=print Õâ¸öÊôÐÔ¿ÉÒÔÔÚ´òӡʱÓÐЧ-->
<style ......
<mce:script language="javascript" ><!--
function person(name,age)
{
this.name=name;
this.age=age;
}
function man(name,age)
{
this.sex="ÄÐ";
this.base=person;
this.base(name,age);
}
function woman(name,age)
{
this.sex="Å®";
this.base=person;
this.base(name,age)
}
......
½ñÌìÔÚѧϰBomʱÓöµ½ÁËÒ»¸ö´íÎó£º
Static overflow at 7
´íÎóÔÒò£º×Ô¶¨ÒåÁËÒ»¸ö scrollTo()£¬Óëϵͳwindow.scrollTo()³åÍ»£¬ÒÔÖÂÒýÆðËÀÑ»·£¬´Ë´íÎóÔÚµ¯³ö´íÎó¿ò£¬¶øÔÚFFÏÂûÓз´Ó¦£¬µ«functionÒ²²»Ö´ÐС£ÁíÍâ<img src="" onerror=""/>Ò²¿ÉÄܳöÏÖÕâÖÖÇé¿ö¡£ÏêϸÇë²Î¿¼£ºhttp://www.cnblogs.com/S.Sams/archive/200 ......
Ò»¡¢Ö÷Ò³Ãæ(²ÉÓÃjspʵÏÖ)
<%@ page language="java" contentType="text/html; charset=gb2312"
pageEncoding="gb2312"%>
<%@page import="org.accp.jwebplayer.biz.MusicBiz"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<h ......
ÄÚÖÃÀà
JavaScriptÊÇÒ»ÖÖ»ùÓÚ¶ÔÏóµÄ½âÊÍÐÔ±à³ÌÓïÑÔ£¬ËùÓеÄÔªËØ£¬ÎÒÃǶ¼¿ÉÒÔÀí½âΪ¶ÔÏó£¬Ã¿¸ö¶ÔÏóÒ²¿ÉÒÔÀí½âΪN¶àÊôÐԵļ¯ºÏ¡£ÔÚÌÖÂÛ×Ô¶¨ÒåÀà֮ǰ£¬ÎÒÃÇÏÈ¿´Ò»ÏÂÄÚÖõÄÀà¡£×÷Ϊ½âÊÍÐÔÓïÑÔ£¬JavaScriptÔÊÐíÎÒÃÇÔÚÈκÎʱºòΪ¶ÔÏóÌí¼ÓÊôÐÔ¡£ËùÒÔÎÒÃÇ¿ÉÒÔÏÈ¿´Ò»¶Î¼òµ¥µÄ´´½¨¶ÔÏóµÄ´úÂëƬ¶Î¡£ÕâÀïµÄ“new Object”Ò²¿ ......