站 内 搜 索
推 荐 合 作 商
优 秀 内 容 推 荐
  您当前位置:中国素材首页 >> 网页特效 >> 资料类 >> 应用色彩学
 
应用色彩学
中国素材网 www.sucai.com 2005-3-31 13:44:00 流量数:

应用色彩学
[查看演示]  源码如下
----------------------------------------------------------------------------------------
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>Description   Fires immediately after the browser loads the
given object-www.Sucai.com</title>
<style>body,td,div,a,input{font:menu}</style>
</head>

<body>

<p>Description <br>
<br>
Fires immediately after the browser loads the given object. <br>
<br>
Remarks <br>
<br>
The browser loads applications, embedded objects, and images as soon as it encounters the APPLET, EMBED, and IMG elements during parsing. This means that the onload event for these objects occurs before the browser parses any subsequent elements. To ensure that an event handler receives the onload event for these elements, you must place the SCRIPT element that defines the event handler before the element and use the onload attribute in the element to set the handler. <br>
<br>
The onload attribute of the BODY element sets an onload event handler for the window. Setting an onload event handler for the window object by any other means will override the handler set using the onload attribute if the handlers are in the same script language. <br>
<br>
This event will not bubble. Events that do not bubble can only be handled on the individual object that fired the event. <br>
<br>
Examples <br>
<br>
The following JScript example is an onload event handler for the window. <br>
<br>
<SCRIPT FOR=window EVENT=onload LANGUAGE="JScript"> <br>
window.status = "Page is loaded!"; <br>
</SCRIPT> <br>
<br>
The following JScript example sets an onload event handler for an IMG element. The handler uses the event object to retrieve the URL of the image. <br>
<br>
<SCRIPT LANGUAGE="JScript"> <br>
function imageLoaded() <br>
{ <br>
window.status = "Image \"" + window.event.srcElement.src + "\" is loaded"; <br>
} <br>
</SCRIPT> <br>
<IMG SRC="sample.gif" onload="imageLoaded()"> <br>
<br>
Applies To <br>
<br>
APPLET, EMBED, FRAMESET, IMG, LINK, SCRIPT, STYLE, window<br>
</p>

</body>

</html>

<div style="position: absolute; top: 10; right: 10; width: 148; height: 18;cursor:hand">
<input type="button" name="Button" value="查看源代码" onClick= 'window.location = "view-source:" + window.location.href'></div>