Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

JavaScript¶ÁÈ¡TxtÎļþ

JavaScript¶ÁÈ¡TxtÎļþ
<html>
<head>
<title>new page</title>
<script>
 GetHeader(src) {
var ForReading=1;
var fso=new ActiveXObject("Scripting.FileSystemObject");
var f=fso.OpenTextFile(src,ForReading);
return(f.ReadAll());
}
var arr=GetHeader("C:\\a.txt").split("\r\n");
for(var i=0;i<arr.length;i++){
alert("µÚ"+(i+1)+"ÐÐÊý¾ÝΪ:"+arr[i]);
}
</script>
</head>
<body>
</body>
</html>


Ïà¹ØÎĵµ£º

JavaScript¾²Ì¬·½·¨

       ¾²Ì¬·½·¨µÄʵÖÊÓëÈÎºÎÆäËûÒ»°ãº¯ÊýûÓÐʲô²»Í¬£¬×îÖ÷ÒªµÄÇø±ðÔÚÓÚ£¬ÆäËûº¯ÊýÊÇÒÔ¶ÔÏóµÄ¾²Ì¬ÊôÐÔÐÎʽ´æÔڵġ£×÷Ϊһ¸öÊôÐÔ£¬ËüÃDz»ÄÜÔڸöÔÏóµÄʵÀýµÄÉÏÏÂÎÄÖзÃÎÊ£¬¶øÖ»ÊôÓÚÖ÷¶ÔÏó±¾ÉíµÄÄǸöÉÏÏÂÎÄÖС£¶Ôϰ¹ßÁË´«Í³Ààʽ¼¯³ÉµÄÈËÀ´Ëµ£¬Õâ¾ÍÏñÀàÀﶨÒåµÄ¾²Ì¬·½·¨¡£
    ......

javaScript(&jQuery)¹¤¾ß¼°ÏàÓ¦ÍøÕ¾×ÊÁÏ

1.Dean Edwards±àдµÄPacker£¨http://dean.edwards.name/packer/£©£¬ÓÃÓÚѹËõJavaScript
2.»ñÈ¡JQuery£ºhttp:/jquery.com 
                     http://docs.jquery.com/Downloading_jQuery   ÏÂÔØ¸÷¸ö°æ±¾¼°ÏàÓ¦°ïÖúÎ ......

JavaScriptµÄ5ÖÖÊý¾ÝÀàÐÍ


JavaScriptÒÔECMAScript±ê×¼×÷Ϊ¹¦ÄÜ»ù×¼£¬ECMAScriptÓÐ5ÖÖÔ­ÐÍÀàÐÍ£ºUndefined£¬Null£¬Boolean£¬NumberºÍString¡£
        ¿ÉÒÔÓÃtypeofÀ´ÅжÏÀàÐÍ£¬Àý£º
        var sTemp = "test string";
        alert(typeof sTem ......

JavaScriptµÄfor inÓï¾ä


ÓÃÓÚö¾Ù¶ÔÏóµÄÊôÐÔ
    Àý£º
        for(sProp in window)
        {
            alert(sProp);   //ÏÔʾBOM window¶ÔÏóµÄËùÓÐÊôÐÔ¡£
        }& ......

JavaScriptµÄÔËËã·û


deleteÖ»ÄÜɾ³ý¿ª·¢Õß¶¨ÒåµÄÊôÐÔ»ò·½·¨£¬Ô­Ê¼µÄECMAScript·½·¨²»ÄÜɾ³ý£¬ÒòΪ²»ÊÇ¿ª·¢Õß¶¨ÒåµÄ£¬±ÈÈ磺toString()¡£
        var o = new Object;
        o.name = "Nicholas";
        delete o.name;
   &n ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ