javascript ÔØÈëͼƬºóÖ´ÐÐij²Ù×÷
function EnhancedImage(src,onLoaded){
var self = this;
this.src = src;
this.width = 0;
this.height = 0;
this.onLoaded = onLoaded;
this.loaded = false;
this.image = null;
this.load = function(){
if(this.loaded)
return;
this.image = new Image();
this.image.src = this.src;
function loadImage(){
if(self.width != 0 && self.height != 0){
clearInterval(interval);
self.loaded = true;
self.onLoaded(self);//½«ÊµÀý´«Èë»Øµ÷º¯Êý
}
self.width = self.image.width;//ÊÇnumberÀàÐÍ
self.height = self.image.height;
}
var interval = setInterval(loadImage,100);
}
}
function onImageLoad(image){
document.getElementById('banner').appendChild(image.image);
}
var img = new EnhancedImage("somthing.jpg",onImageLoad);
img.load();
newÒ»¸öImage¶ÔÏó£¬ÉèÖÃÁËsrcÊôÐÔ¹ýºó£¬²»¶ÏµÄ¼ì²éÐèÒªÔØÈëµÄͼƬµÄ¿íºÍ¸ß£¬Èç¹ûÔØÈëͼƬ³É¹¦µÄ»°£¬¿íºÍ¸ß¶¼ÊDz»Îª0µÄÊýÖµ£¬Õâ¸öʱºòÍ£Ö¹Interval £¬²¢ÇÒÖ´ÐÐonLoaded¡£
Ïà¹ØÎĵµ£º
<script>
///Óû§Êý¾Ý½á¹¹
function _tagUser()
{
this.UserId = 0; //0-4
this.UserName = ""; //5-
this.Parse = function(VarTypeUser)
{
for (var i=0;i<VarTypeUser.length;i++)
VarTypeUser[i] = String.fro ......
javascriptʼþÇý¶¯¿ò¼Ü ÊÕ²Ø
Ò»¸ö¼òµ¥µÄʼþÇý¶¯¿ò¼ÜµÄÑÝʾ£º
/*ControlDemo.js*/
//ʼþÇý¶¯¿ò¼Ü£¨ÑÝʾ£©
function ControlDemo(page)
{
//³õʼ»¯Page
if (page == null)
{
page = self;
}
if (page != self)
{
//Do sth. here...
}
&nb ......
ÔÚÏßÊÔÍ棺http://asfoxes.w229.7ga.net/js
ÏÂÔصØÖ·£ºhttp://download.csdn.net/source/2235386
֮ǰ»¨ÁËÒ»¸ö½üÒ»¸öÀñ°ÝдµÄ
Ä¿Ç°»ù±¾Íê³ÉÁË£¬¿ÉÒÔÈ¥³¢ÊÔÏÂ
ä¯ÀÀÆ÷°æ±¾£º
IE8Õý³£ÔËÐÐ
op¡¢ff...ÉÐÓÐÒ»¸öСbug£¬²»ÄÜÍêÃÀÔËÐÐ
Ö÷ÒªÓÐÒÔϼ¸¸öÎÊÌâÔÝʱû´¦Àí£º
1.¸ü¼Ó¶àµÄÖ²ÎïºÍ½©Ê¬ÖÖÀàÌí¼Ó
2.Ö²ÎïºÍ½©Ê¬µÄÌùͼ»¹ ......
JavaScript µÄ³É¹¦ÈÃÈ˽ò½òÀÖµÀ£¬Îª Web ÍøÒ³±àд JavaScript ´úÂëÒѾÊÇËùÓÐ Web
Éè¼ÆʦµÄ»ù±¾¹¦£¬ÕâÃÅÓÐȤµÄÓïÑÔÔ̲Ø×ÅÐí¶à²»ÎªÈËÊìÖªµÄ¶«Î÷£¬¼´Ê¹¶àÄêµÄ JavaScript ³ÌÐòÔ±£¬Ò²Î´ÄÜÍêÈ«³Ô͸¡£±¾ÎÄ´Ó7¸ö·½Ãæ½²Êö
JavaScript ÖÐÄÇЩÄã²»ºÜÊìÖªµ«·Ç³£ÊµÓõļ¼ÇÉ¡£
¼òÂÔÓï¾ä
JavaScript ¿ÉÒÔʹÓüòÂÔÓï¾ä¿ìËÙ´´½¨¶ÔÏóº ......
ÕýÔò±í´ïʽÊÇÒ»¸ö·Ç³£·Ç³£·Ç³£Ç¿´óµÄÓïÑÔ£¬ÕâÀïÁ¬ÐøÓÃÁËÈý¸ö·Ç³££¬ÎÒ¾õµÃ»¹²»¹»£¬Ëü½¿Ð¡µ«È´¹¦
ÄÜÇ¿´ó£¬¾ø¶ÔµÄŨËõµÄ¾ÍÊǾ«»ª£¬ÎÒ·¢ÏÖÎÒÔ½À´Ô½Ï²»¶ËüÁË¡£
Õâ¶Îʱ¼ä×öÈÕÆڵĴ¦Àí£¬ÐèÒªÓõ½ÈÕÆڵļÆË㣬°üÀ¨¼Ó¼õʲôµÄ£¬ÓÚÊÇ×öÁËÒ»¸ö¹«Óô¦ÀíµÄÀ©Õ¹£¬½Ð
String.prototype.dateExpression¡£ÒòΪÈÕÆÚ´¦Àí¶¼»áÓõ½±í´ïʽ£¬À ......