javascriptͼƬÇл»Ð§¹û/´øÎÄ×Ö
´¿Í¼Æ¬°æ£º
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Slideshow</title>
<mce:script type="text/javascript" charset="utf-8"><!--
var galleryarray = ['dog.gif','cat.gif','penguin.gif'];
var curimg=0;
function rotateimages(){
document.getElementById("slideshow").setAttribute("src","img/"+galleryarray[curimg])
//document.getElementById("slideshow").src="img/"+galleryarray[curimg]
curimg=(curimg<galleryarray.length-1)?curimg+1:0
}
window.onload=function(){
setInterval("rotateimages()",2500)
}
// --></mce:script>
</head>
<body>
<div style="width:170px;height:160px;border:4px solid #e2e2e2;margin:0 auto;">
<img id="slideshow" src="img/cat.gif" mce_src="img/cat.gif">
</div>
</div>
</body>
</html>
ͼƬ£«ÎÄ×Ö˵Ã÷
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Slideshow</title>
<mce:script type="text/javascript" charset="utf-8"><!--
var galleryarray =
['dog.gif|dog','cat.gif|cat','penguin.gif|penguin'];
var curimg=0;
function rotateimages(){
document.getElementById("slideshow").setAttribute("src","img/"+galleryarray[curimg].split("|")[0])
document.getElementById("showTxt").innerHTML=galleryarray[curimg].split("|")[1];
//document.getElementById("slideshow").src="img/"+galleryarray[curimg]
curimg=(cu
Ïà¹ØÎĵµ£º
B.1 anchor¶ÔÏó
¡¡¡¡Ê¹ÓÃ<A NAME=>±ê¼Ç´´½¨µÄhtmlÃèµãÄܱ»Ò»¸öÁ´½Ó×÷ΪĿ±êÈç¹ûêµã°üÀ¨HREF=ÌØÐÔ,ÔòËüÒ²ÊÇÒ»¸öÁ´½Ó¶ÔÏó¡£
¡¡¡¡anchor¶ÔÏóÊÇdocument¶ÔÏóµÄÒ»¸öÊôÐÔ,Ëü±¾ÉíûÓÐÊôÐÔ·½·¨»òÕßʼþ´¦Àí³ÌÐò¡£
¡¡¡¡B.2 anchorsÊý×é
¡¡¡¡anchorsÊý×éÊÇdocument¶ÔÏóµÄÒ»¸öÊôÐÔ,ÊÇÎĵµÄÚËùÓÐanchor¶ÔÏóµÄÒ»¸öÁбíÈç¹ ......
¸ù¾ÝÉí·ÝÖ¤ºÅÂëÈ¡µÃÉúÈÕÓëÐԱ𣬲¢ÅжÏ18λÉí·ÝÖ¤µÄÕýÈ·Óë´íÎó:
function showBirthday(val){
var birthdayValue;
if(15==val.length){//15λÉí·ÝÖ¤ºÅÂë
birthdayValue = val.charAt(6)+val.charAt(7);
if(parseInt(birthdayValue)<10){
birthdayValue = '20'+birthdayValue;
}else{
birthdayValue = '1 ......
×î¾Ê¹ÓÃjquery.form.js×öÁËÒ»¸ö²éѯҳÃ棬ÔÚËÑË÷³ö½á¹ûºó£¬ÐèÒª·ÖÒ³£¬ÔÚ·ÖÒ³Öеã»÷ÏÂÒ»Ò³Ò³²ÅÓÃajaxÌá½»£¬ÔÚÌύûÓзµ»Ø½á¹ûÊÇÐèÒª¸ø¿Í»§ÏÔʾһÏÂÕýÔÚ¼ÓÔØÊý¾Ý£¬¹ÊÓÃjquery.1.3.2.js×öÁËÒ»¸öÐÅÏ¢ÌáʾµÄ½Å±¾¡£
´úÂëÈçÏ£º
<div id="loadProcess" style="z-index:1;visibility:hidden;width:300px;position:absolute;t ......
ÀûÓÃjsÀ´¶¯Ì¬´´½¨±í¸ñÓÐÁ½ÖÖ¸ñʽ£¬appendChild()ºÍinsertRow¡¢insertCell()¡£Á½ÖÖ·½Ê½Æäʵ²î²»¶à£¬µ«µÚÒ»ÖÖÓпÉÄÜÔÚIEÉÏÓÐÎÊÌ⣬ËùÒÔÍƼö´ó¼ÒʹÓõڶþÖÖÁË£¬Ö±½Ó˵°É¡£
1¡¢inserRow()ºÍinsertCell()º¯Êý
insertRow()º¯Êý¿ÉÒÔ´ø²ÎÊý£¬ÐÎʽÈçÏ£º
insertRow(index)£ºindex´Ó0¿ªÊ¼
Õâ¸öº¯Êý½«ÐÂÐÐÌí¼Óµ½indexµÄÄÇÒ»ÐÐÇ ......
//̽²âͼƬÊÇ·ñ´æÔÚ
function IsExist(url)
{
x = new ActiveXObject("Microsoft.XMLHTTP")
x.open("HEAD",url,false)
x.send()
return x.status==200
}
ÅжÏijһ¸öÍøÂçµØÖ·µÄͼƬÊÇ·ñ´æÔÚ£¬Èç¹û´æÔÚ£¬¾Í»á·µ»Øtrue ,²»´æÔھͷµ»Ø false~~~~ ......