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>
Ïà¹ØÎĵµ£º
ASP.NETÖÐǰ̨javascriptÓëºǫ́´úÂëµ÷ÓÃ
2010-03-31 10:01
.netÖÐC#´úÂëÓëjavaScriptº¯ÊýµÄÏ໥µ÷ÓÃÎÊÌâ¡£
¡¡¡¡ÎÊ£º
¡¡¡¡1.ÈçºÎÔÚJavaScript·ÃÎÊC#º¯Êý?
¡¡¡¡2.ÈçºÎÔÚJavaScript·ÃÎÊC#±äÁ¿?
¡¡¡¡3.ÈçºÎÔÚC#ÖзÃÎÊJavaScriptµÄÒÑÓбäÁ¿?
¡¡¡¡4.ÈçºÎÔÚC#ÖзÃÎÊJavaScriptº¯Êý?
¡¡¡¡ÎÊÌâ1´ð°¸ÈçÏ£º
¡¡¡¡javaScriptº¯ ......
JavaScriptÒÔECMAScript±ê×¼×÷Ϊ¹¦ÄÜ»ù×¼£¬ECMAScriptÓÐ5ÖÖÔÐÍÀàÐÍ£ºUndefined£¬Null£¬Boolean£¬NumberºÍString¡£
¿ÉÒÔÓÃtypeofÀ´ÅжÏÀàÐÍ£¬Àý£º
var sTemp = "test string";
alert(typeof sTem ......
deleteÖ»ÄÜɾ³ý¿ª·¢Õß¶¨ÒåµÄÊôÐÔ»ò·½·¨£¬ÔʼµÄECMAScript·½·¨²»ÄÜɾ³ý£¬ÒòΪ²»ÊÇ¿ª·¢Õß¶¨ÒåµÄ£¬±ÈÈ磺toString()¡£
var o = new Object;
o.name = "Nicholas";
delete o.name;
&n ......
ÎÒÃǶ¼ÖªµÀ£¬ajaxÄÜÌá¸ßÒ³ÃæÔØÈëµÄËٶȵÄÖ÷ÒªÔÒòÊÇͨ¹ýajax¼õÉÙÁËÖØ¸´Êý¾ÝµÄÔØÈë£¬ÕæÕý×öµ½°´Ðè»ñÈ¡£¬¼ÈÈ»Èç´Ë£¬ÎÒÃÇÔÚдajax³ÌÐòµÄʱºò²»·ÁËÍ·ðË͵½Î÷£¬ÔÚ¿Í»§¶ËÔÙ×öÒ»´Î»º´æ,½øÒ»²½Ìá¸ßÊý¾ÝÔØÈëËÙ¶È¡£ÄǾÍÊÇÔÚÔØÈëÊý¾ÝµÄͬʱ½«Êý¾Ý»º´æÔÚä¯ÀÀÆ÷ÄÚ´æÖУ¬Ò»µ©Êý¾Ý±»ÔØÈë£¬Ö»ÒªÒ³ÃæÎ´Ë¢Ð£¬¸ÃÊý¾Ý¾ÍÓÀÔ¶µÄ»º´æÔÚÄÚ´æÖУ¬µ±Ó ......