链接类

VML

按钮类

标题类

表单类

表格类

菜单类

窗口类

对象类

滚动条

键盘类

框架类

例子类

模拟类

日期类

色彩类

鼠标类

数学类

图片类

文字类

下拉框

样式类

游戏类

状态栏

资料类

字幕类

其它类

 ·JAVASCRIPT...
 ·HTTP 1.1状态...
 ·JavaScript...
 ·Js事件触发列表与解说
 ·Location对 ...
 ·为何要学JavaSc...
 ·常见问题
 ·onload说明
 ·剪贴板操作
您当前位置:好素材首页 -> 网页特效 -> 资料类
查看信息

应用色彩学
好素材网 www.HaoSc.com 02月22日 11:49

[查看演示]  源码如下
----------------------------------------------------------
<html>

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

<body>

<p>Description&nbsp;<br>
<br>
Fires immediately after the browser loads the given object.&nbsp;<br>
<br>
Remarks&nbsp;<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.&nbsp;<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.&nbsp;<br>
<br>
This event will not bubble. Events that do not bubble can only be handled on the individual object that fired the event.&nbsp;<br>
<br>
Examples&nbsp;<br>
<br>
The following JScript example is an onload event handler for the window.&nbsp;<br>
<br>
<SCRIPT FOR=window EVENT=onload LANGUAGE="JScript">&nbsp;<br>
window.status = "Page is loaded!";&nbsp;<br>
</SCRIPT>&nbsp;<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.&nbsp;<br>
<br>
<SCRIPT LANGUAGE="JScript">&nbsp;<br>
function imageLoaded()&nbsp;<br>
{&nbsp;<br>
window.status = "Image \"" + window.event.srcElement.src + "\" is loaded";&nbsp;<br>
}&nbsp;<br>
</SCRIPT>&nbsp;<br>
<IMG SRC="sample.gif" onload="imageLoaded()">&nbsp;<br>
<br>
Applies To&nbsp;<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>


此信息共 1 页 [1]