leo列

导航

2012年12月13日 #

字符串详解-----笔记

摘要: 1.var str="abcdefghijkmn";alert(str.charAt(3)); //弹出dstr.charAt(n); 取str字符串上第n个位置上的字符var str="abcdefghijkmn";alert(str.charCodeAt(3)); //返回100alert(String.fromCharCode(100)); //返回dstr.charCodeAt(n) str字符串上第n个位置上对应字符的ASC码String.fro... 阅读全文

posted @ 2012-12-13 18:03 leo列 阅读(217) 评论(0) 推荐(0) 编辑

图片预加载

摘要: for(var i=1;i<77;i++) { (function (oNewImg){ var oImg=new Image(); oImg.onload=function () { oNewImg.src=this.src; }; oImg.src='img/miaov ('+i+').jpg'; oNewImg.style.display='none'; ... 阅读全文

posted @ 2012-12-13 16:34 leo列 阅读(142) 评论(0) 推荐(0) 编辑