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

JavaScript »ñÈ¡¿Í»§¶Ë¼ÆËã»úÓ²¼þ¼°ÏµÍ³ÐÅÏ¢


//ϵͳÐÅÏ¢»ñÈ¡
function getSysInfo(){
var locator = new ActiveXObject ("WbemScripting.SWbemLocator");
var service = locator.ConnectServer(".");
//CPUÐÅÏ¢
var cpu = new Enumerator (service.ExecQuery("SELECT * from Win32_Processor")).item();
var cpuType=cpu.Name,hostName=cpu.SystemName;
//ÄÚ´æÐÅÏ¢
var memory = new Enumerator (service.ExecQuery("SELECT * from Win32_PhysicalMemory"));
for (var mem=[],i=0;!memory.atEnd();memory.moveNext()) mem[i++]={cap:memory.item().Capacity/1024/1024,speed:memory.item().Speed}
//ϵͳÐÅÏ¢
var system=new Enumerator (service.ExecQuery("SELECT * from Win32_ComputerSystem")).item();
var physicMenCap=Math.ceil(system.TotalPhysicalMemory/1024/1024),curUser=system.UserName,cpuCount=system.NumberOfProcessors

return {cpuType:cpuType,cpuCount:cpuCount,hostName:hostName,curUser:curUser,memCap:physicMenCap,mem:mem}
}
´úÂëʵÏÖÖ÷Òª°üÀ¨Õ⼸²¿·Ö£º
ÏÈͨ¹ýnew ActiveXObject ("WbemScripting.SWbemLocator"); ·ÃÎʵ½WbemScripting¶ÔÏó¡£
ͨ¹ýlocator.ConnectServer(".");Á¬½ÓÎÒÃDZ¾µØµçÄÔ£¨.´ú±í±¾µØµçÄÔ£¬µ±È»Ò²¿ÉÒÔ·ÃÎÊÆäËû¼ÆËã»ú£©¡£
ͨ¹ýservice.ExecQuery("SELECT * from Win32_Processor")Õâ¸öÀàËÆsqlµÄÓï¾ä£¨ÆäʵϵͳÐÅÏ¢Ò²ÊÇ´æ´¢ÔÚ¼ÆËãÖÐÒ»¸öÀàËÆÊý¾Ý¿âµÄÎļþÖУ©»ñÈ¡ÎÒÃÇÐèÒªµÄ¶ÔÏóµÄ¼Ç¼¼¯¡£
ͨ¹ýnew EnumeratorÀ´´´½¨Ò»¸ö¿Éö¾ÙµÄ¶ÔÏó£¬ÏÂÃæ¾Í¿ÉÒÔ±éÀúÈ¡ÐÅÏ¢ÁË¡£
×¢Ò⣺ÔËÐеÄÇ°ÌáÊÇÒªÐÞ¸Ää¯ÀÀÆ÷°²È«ÉèÖ㬓ÔÊÐí¶Ôδ±ê¼ÇΪ¿É°²È«Ö´ÐеÄActiveX½Å±¾µÄÔËÐД£¬ÉèÖÃΪÔÊÐí»òÌáʾ¡£


Ïà¹ØÎĵµ£º

Google ÅÅÃûÖÐµÄ 10 ¸ö×îÖøÃûµÄ JavaScript ¿â

ugmbbc·¢²¼ÓÚ 2009-11-14 09:41:43| 7628 ´ÎÔĶÁ ×ÖÌ壺´ó С ´òÓ¡Ô¤ÀÀ
var ReTitle = '»Ø¸´:Google ÅÅÃûÖÐµÄ 10 ¸ö×îÖøÃûµÄ JavaScript ¿â';
¸ÐлCOMSHARP CMSµÄͶµÝ
ÐÂÎÅÀ´Ô´:tripwiremagazine.com
JavaScript ÊÇ Web ¿ª·¢ÓëÉè¼ÆÖв»¿É»òȱµÄ¶«Î÷£¬²»¹ÜÊÇÒ»¸ö¼òµ¥µÄÍøÒ³»¹ÊÇÒ»¸öרҵµÄÕ¾µã£¬Ò²²»¹ÜÄãÊǸßÊÖ»¹ÊDzËÄñ ......

javascriptѧϰËæ±Ê(ʹÓÃwindowºÍframe)µÄ¼¼ÇÉ

JavaScriptÔÊÐí´´½¨ºÍ´ò¿ª´ú±íHTMLÎı¾, form¶ÔÏóºÍframeµÄ´°¿Ú.
window¶ÔÏóÊÇJavaScript¿Í»§²ã´Î½á¹¹µÄ×²ã¶ÔÏó,
formÔªËغÍÈ«²¿JavaScript´úÂ붼ÊÇ´æÔÚÓÚÎĵµÖÐ,¶øÎĵµ±»×°Ôؽø´°¿Ú. ΪÁËÀí½â´°¿ÚÔõÑù¹¤×÷,Äã¿ÉÒÔ¿ØÖƲÙ×÷ÕâЩ´°¿Ú.
´ò¿ªºÍ¹Ø±Õ´°¿Ú
µ±
Óû§Æô¶¯(launch)Navigatorʱ,½«×Ô¶¯´´½¨Ò»¸ö´°¿Ú.Óû§»¹¿ÉÒ ......

Javascript DOM ±à³ÌÒÕÊõ

JSÖÐÊý×éµÄÅúÁ¿Ìî³ä·½Ê½:
  1.ÔÚÉùÃ÷ʱͬʱ½øÐÐÌî³ä
        var beatles = Array("John","Paul","George","Ringo");
  2.ÎÒÃÇÉõÖÁÓò»×ÅÃ÷È·µØ±íÃ÷ÎÒÃÇÊÇÔÚ´´½¨Êý×é.ÊÂʵÉÏ,Ö»ÐèÓÃÒ»¶Ñ·½À¨ºÅÀ¨ÆðÀ´¾Í×ãÒÔ´´½¨ÎÒÃÇÏëÒªµÄÊý×éÁË: ......

javascript+div+css¹ö¶¯²Ëµ¥µÄʵÏÖ.

Ч¹ûͼ
´úÂë:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Scrollable</title>
<mce:script type="text/javascript"><!--
resizeCallback = function() {
......

javascriptÓëflashº¯ÊýÏ໥½»»¥

Java´úÂë import flash.external.ExternalInterface;   function hello(){   return "²âÊԳɹ¦ÁËŶ~~";       }   //ÔÊÐíflashµ÷ÓÃjsº¯Êý ²ÎÊý1£ºjsº¯ÊýÃû³Æ ²ÎÊý2£ºÏòjsº¯Êý´«µÝµÄ²ÎÊý ExternalInterface.call("hello", "jacky");  ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ