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

¹ØÓÚjavascriptÎÊÌâ,,ºÜ¼± - Web ¿ª·¢ / JavaScript

ÓÃjavascript½«Êý¾Ýµ¼³öµ½Îı¾Îļþ(txt)ÖÐ..

Ê×ÏȼÙÉèÒѾ­ÓÐÁËÐèҪдÈëµÄÎı¾ÄÚÈÝ var txtContent ="ÐèҪдÈëµÄÄÚÈÝ";
ÏÖÔÚÐèÒªÓÃjavascript½«ÄÚÈÝдÈëtxtÎļþ(Õâ¸ötxtÎļþ²»´æÔÚ,ÐèÒª´´½¨)ÖÐ,È»ºóдºÃÖ®ºóÐèÒª´ò¿ª(»òÕßÓб£´æµÄ¶Ô»°¿ò),ÈÃʹÓÃÕß×Ô¼º±£´æ...

¾ÍÊÇÈÃʹÓÃÕß¿´×ÅÀàËÆtxtÊÇÏÂÔصÄ.....

ÎÒÕÒÁ˺ܶàÎĵµ»ù±¾É϶¼ÊÇÕâÑùµÄ
var fso, f1;  
fso = new ActiveXObject("Scripting.FileSystemObject");  
f1 = fso.CreateTextFile("c:\\testfile.txt", true);  

ÕâÑùÓиöÎÊÌâ,Ê×ÏÈÐèÒª´´½¨¸öÎļþµ½CÅÌ...ÎÒÊÇÒªÌṩÏÂÔضԻ°¿ò»òÊÇ´ò¿ªÕâ¸öÎļþÈÃʹÓÃÕß×Ô¼º±£´æ
Ò»°ëµÄä¯ÀÀÆ÷³öÓÚ°²È«¿¼ÂÇÊDz»ÔÊÐí¶Áд±¾µØÎļþµÄ¡£

¿ÉÒÔÔÚ·þÎñÆ÷¶ËÉú³ÉÒª±£´æµÄÎļþÈ»ºóÈÃÓû§ÏÂÔØ£¬¾ÍÏëµ±ÓëÒ»°ãµÄÎļþÏÂÔØÒ»Ñù¡£

ʵÏÖ²»Á˵ģ¬ä¯ÀÀÆ÷µÄ°²È«²ßÂÔÏÞÖÆÄãÕâÑù×ö.

»¹ÓÐÒ»µã£¬JavascriptÊÇÔÚ¿Í»§¶ËÖ´ÐУ¬ÔõôдÁËÎļþºó£¬»¹Äܵ¯³öÏÂÔضԻ°¿ò.

Â¥Ö÷»¹ÊÇÔÚ·þÎñ¶ËÍê³É°É

²»ÒªÓÃjsÉú³ÉÎļþµÄ·½Ê½£¬ÓÃÒ»¸öеÄÒ³ÃæÉú³ÉtxtÀ´ÌṩÏÂÔØ
ÔÚÒ³Ê×¼ÓÉÏ£º
response.setHeader("Content-Disposition", "attachment;filename=output.txt");
Á¬½Óµ½Õâ¸öÒ³Ãæ¾Í»á³öÏÖÏÂÔصÄÌáʾ

ѧϰ

JS²»Êʺϣ¬²»½ö¹¦ÄÜÈõ£¬»¹Êܲ»Í¬µÄä¯ÀÀÆ÷°²È«»úÖÆÏÞÖƶøÎÞ·¨ÍêȫͨÓ㬻¹ÊÇÓÃASP,JSP,PHP×ö±È½ÏºÏÊÊ¡£

ÒýÓÃ
JS²»Êʺϣ¬²»½ö¹¦ÄÜÈõ£¬»¹Êܲ»Í¬µÄä¯ÀÀÆ÷°²È«»úÖÆÏÞÖƶøÎÞ·¨ÍêȫͨÓ㬻¹ÊÇÓÃASP,JSP,PHP×ö±È½ÏºÏÊÊ¡£


¹¦ÄÜÈõ£¿×Ô¼ºÑ§ÒÕ²»¾«¾Í²»Òª¹Öʦ¸¸½ÌµÄ²»ºÃ¡


Ïà¹ØÎÊ´ð£º

ºǫ́µ÷ÓÃJavaScriptÎÊÌâ - .NET¼¼Êõ / ASP.NET

ÎÒÔÚºǫ́µ÷ÓÃJavaScriptµÄʱºò£¬ËûÊÇÔÚºǫ́°ÑʼþµÄ´úÂëÖ´ÐÐÒ»´ÎºóÔÚÖ´ÐÐJavaScript·½·¨
 ÓÐʲô°ì·¨ ÔÚÖ´ÐÐJavaScript·½·¨µÄʱºòͣס£¬ÔÚÖ´ÐкóÃæµÄ´úÂë
²»Ì«Ã÷°×°¡£¬ËµÇå³þµã°É

¾ÍÊÇÖ´Ðкǫ́´úÂëµÄʱºò ......

javaScriptÐüÍ£¿Ø¼þÉϵĸ¡¶¯²ã¶¨Î»

ÈçºÎʵÏÖµ±Êó±êÐüÍ£¿Ø¼þÉÏʱ£¬³öÏָÿؼþµÄβ²¿ÏÔʾ¶ÔÓ¦µÄ²ã£¬Êó±êÒƶ¯µ½¸Ã²ãÉϽøÐÐÏàÓ¦µÄ²Ù×÷£¬µ±Êó±êÒƳýʱ£¨²»ÔڿؼþÉÏÒ²²»ÔÚ²ãÉÏ£©²ãÒþ²Ø£¬
HTML code:
<html>
<head>
<meta http-equiv= ......

IE7ä¯ÀÀÆ÷ÏÂΪºÎ²»ÄÜÔËÐÐflashºÍJavascript£¿

ÎÒ¼ÒµçÄÔÔ­À´×°µÄÊÇIE7ä¯ÀÀÆ÷£¬µ«ÊÇ×î½üÎÒ°Ö°Ö¶¯ÁËij¸öÅäÖ㬵¼ÖÂIE7»·¾³Ï²»ÄÜÔËÐÐflashºÍjavascript£¬¿´sina»òÕßÆäËûÐÂÎÅÍøÕ¾É϶¼ÊÇÒ»¿éÒ»¿é¿Õ°×£¬µÇ½twitterÒ²²»³É¹¦£¬±¨£ºÓÉÓÚ²»Ö§³Öjavascript£¬µ¼Ö²»Äܵǽ¡£ ......

ÉϺ£ÍøÕ¾½¨Éè½ÌÄãJavaScriptÖеĹ¹Ôì¼Ì³Ð·¨

  ¶ÔÓÚJavaScript À´ËµÒªÊµÏÖÉÏÃæÕâÈý²ãº¬Ò壬Æäʵ¼È¼òµ¥ÓÖ²»¼òµ¥¡£Õâ¸ö½áÂÛÌýÆðÀ´ºÜì¶Ü£¬µ«ÊÇÄãºÜ¿ì¾Í»á·¢ÏÖËüÊÇÓеÀÀíµÄ¡£ÏÂÃ潫½éÉܼ¸ÖÖJavaScript ÖоßÌåµÄʵÏּ̳еķ½·¨£¬²¢Ïêϸ·ÖÎöËüÃǵÄÀûÓë±×¡£
......

¹ØÓÚjavascriptÒ³ÃæÄÚ·­Ò³

ÊÖÍ·ÓÐÒ»¸öÍøÕ¾£¬ÍêÈ«ÊÇÓÃjavascriptºÍhtmlдµÄ£¬Ö»ÓÐÒ»¸ö default.htmlÒ³Ã棬Ȼºó×ó²àÓÐÏÂÀ­²Ëµ¥£¬ÖмäÏÔʾÄÚÈÝ£¬ÏÖÔÚµÄÎÊÌâÊÇÏ£ÍûÔÚnews²Ëµ¥µã»÷ºóÏÔʾµÄ¶«Î÷Äܹ»·ÖÒ³£¬µ«ÊÇ·ÖÒ³¼¼ÊõÊÇÒª¸Ä±äurlµÄ£¬ÕâÑùµÄ»°Õû¸öÒ³ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ