javascript¶¨Ê±¸ü»»±í¸ñ±³¾°
<html>
<head>
<title>changePage</title>
</head>
<body>
<table id="pic" cellpadding="0" cellspacing="0" border="1" width="200" height="100" bordercolor="red">
<tr>
<td>picture chanage!</td>
</tr>
</table>
<script type="text/javascript">
<!--
window.onload=function()
{
changePicture();
}
var time=0;
function changePicture(){
time++;
document.getElementById('pic').background="images/"+time+".jpg";
if(time==3)
changePicture1();
else
setTimeout(changePicture,500);
}
function changePicture1(){
document.getElementById('pic').background="images/"+time+".jpg";
time--;
if(time==0)
changePicture();
else
setTimeout(changePicture1,10000); //É趨ʱ¼ä
}
-->
</script>
</body>
</html>
Ïà¹ØÎĵµ£º
5¡¢Óà ¹¹Ô캯Êý+ÔÐÍ ¶¨ÒåÒ»¸öÀࣻͬһ¹¹Ô캯Êý¿ÉÒÔ¶¨Òå³ö¶à¸öÀàÐÍ
/**
* $define дÀ๤¾ßº¯ÊýÖ®¶þ
* @param {Object} constructor
* @param {Object} prototype
*/
function $define(constructor,prototype) {
var c = constructor || function(){};
var p = prototype || {};
r ......
9¡¢YUIµÄдÀ෽ʽ
ÕâÀïÒýÈëµÄÊÇYUI 2.7.0°æ£¬Ö»ÐèÒýÈëyahoo.js¡£YUIÒýÈëÁËÃüÃû¿Õ¼ä£¬ÀàËÆÓÚjavaµÄ°ü¡£ÒÔÏÂyahooµÄ¹¤¾ßº¯Êý°ü
YAHOO.namespace
YAHOO.lang
YAHOO.lang.hasOwnProperty
YAHOO.lang.extend
YAHOO.lang.augment
YAHOO.log
YAHOO_config and YAHOO.env
YUI Module Names
дÀ෽ʽ£º
//¶¨Òå°üà ......
×Ö·ûÊǼÆËã»úÈí¼þ´¦ÀíÎÄ×Öʱ×î»ù±¾µÄµ¥Î»£¬¿ÉÄÜÊÇ×Öĸ£¬Êý×Ö£¬±êµã·ûºÅ£¬¿Õ¸ñ£¬»»Ðзû£¬ºº×ֵȵȡ£×Ö·û´®ÊÇ0¸ö»ò¸ü¶à¸ö×Ö·ûµÄÐòÁС£Îı¾Ò²¾ÍÊÇÎÄ×Ö£¬×Ö·û´®¡£ËµÄ³¸ö×Ö·û´®Æ¥Åäij¸öÕýÔò±í´ïʽ£¬Í¨³£ÊÇÖ¸Õâ¸ö×Ö·û´®ÀïÓÐÒ»²¿·Ö£¨»ò¼¸²¿·Ö·Ö±ð£©ÄÜÂú×ã±í´ïʽ¸ø³öµÄÌõ¼þ¡£
......
s<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>ÎÞ±êÌâÎĵµ< ......