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

JavaScript Array Note

/*
ÓÉÓÚjavascriptÊÇÒ»ÖÖÎÞÀàÐÍÓïÑÔ,ËùÒÔÒ»¸öÊý×éµÄÔªËØ¿ÉÒÔ¾ßÓÐÈÎÒâµÄÊý¾ÝÀàÐÍ,ͬһ¸öÊý×éµÄ²»Í¬ÔªËØ
¿ÉÒÔ¾ßÓв»Í¬µÄÀàÐÍ,Êý×éµÄÔªËØÉèÖÿÉÒÔ°üº¬ÆäËûÊý×é,ÕâÑù¾Í¿ÉÒÔ´´½¨Ò»¸ö¸´ÔÓµÄÊý×éÁË.
²¢ÇÒÔÚÕâµãÉÏ˵javascript×÷ΪһÖֽű¾ÓïÑÔ²»Í¬ÓÚÄÇÖÖÑϸñµÄÃæÏò¶ÔÏóµÄc++.c#,javaÁË.¾ßÓиü¸ßµÄÁé»îÐÔ.
*/
/*
ÔÚjavascript1.1ºÍÆäºóµÄ°æ±¾ÖÐ,Êý×éÊÇÓù¹Ô캯ÊýArray()ºÍÔËËã·ûnewÀ´´´½¨,
¿ÉÓÃÒÔϵÄÈýÖÖ·½Ê½À´´´½¨javascript ÖеÄÊý×é.
*/
var a=new Array();
var b=new Array(5,4,3,"first","test,string");
var c=new Array(20);
a[1.23]="test";
document.write("<br /><br />a[1.23]="+a[1.23]);
/*
ÏàÐÅÿλ´ÓÇ¿ÀàÐ͵ıà³ÌÓïÑÔѧϰjavascriptʱ,¾ø¶Ô»áÒÔΪÉÏÃæÕâÖÖ²Ù×÷¸Ðµ½¾ªÑÈ,
floatÊý¾ÝÒ²×÷Êý×éµÄϱêÁË,ÊÂʵÉϲ¢·ÇÈçÄúËùÏë
javascriptÔÚÄúÊÇÓøºÊý,¸¡µãÊý,(»ò²¼¶ûÐÍ,¶ÔÏó,ÆäËûֵʱ),javascript»á½«Ëüת»»ÎªÒ»¸ö×Ö·û´®
ÓÃÉú³ÉµÄ×Ö·û´®×÷Ϊ¶ÔÏóµÄÊôÐÔÃû×Ö,¶ø²»ÊǶ¨ÒåÁËÒ»¸öеÄÊý×éÔªËØ
ÉÏÃæµÄʵÀýÊÂʵ¾ÍÊÇΪa ´´½¨ÁËÒ»¸öÃûΪ:"1.23"µÄÊôÐÔ.
*/
document.write("<br /><br />a.length="+a.length);
document.write("<br /><br />b.length="+b.length);
document.write("<br /><br />c.length="+c.length);
a[3]="Test";
document.write("<br /><br />a[3]="+a[3]);
document.write("<br /><br />a.length="+a.length);
//ÒÔÉϲâÊÔÒ²ºÜÃ÷È·ÎÒÃÇÓÃÕûÊý×÷ΪÊý×éµÄϱêÊDzŻáÕæÕýΪÊý×éÌí¼ÓÒ»¸öÔªËØ£¬
//ÕâÀïÓÃÊý×éµÄ³¤¶ÈÀ´ÌåÏÖÁËjavascriptµÄÊý×éÖеİÂÃî¡£
//ͨ¹ýÉèÖÃÊý×éµÄlengthÊôÐÔÄܹý½Ø¶ÏÊý×éµÄ³¤¶È¡£
a.length=3;
if (a[3]==undefined)
{
document.write("<br /><br />ÔÚa.length="+a.length+"ºó£¬a[3]="+a[3]);
}
else
{
document.write("<br /><br />ÔÚa.length="+a.length+"ºó£¬a[3]="+a[3]);
}
//ÕâÀï²âÊÔÎÒÃǵĶàάÊý×éÔªËØ
/*
javascriptÖÐʵ¼ÊÉÏÊDz»Ö§³Ö¶àάÊý×é
µ«ÊÇÎÒÃǽ«Ò»¸öһάÊý×éµÄÔªËØÔÙ¸³¸øÆäÒ»¸öһάÊý×飬ÕâÑù¾Í¿´ÆðÀ´¾ÍʵÏÖÁ˶àάÊý×éÁË£¬µ«
ʵ¼ÊÉÏËû»¹ÊǸöһάÊý×飬ÕâºÍÎÒÃÇÀí½âcÓïÑÔµÄÊý×éʱµÄÄÇÖÖÏë·¨


Ïà¹ØÎĵµ£º

JavascriptÖÐ×î³£ÓõÄ55¸ö¾­µä¼¼ÇÉ

 1. oncontextmenu="window.event.returnValue=false" ½«³¹µ×ÆÁ±ÎÊó±êÓÒ¼ü
<table border oncontextmenu=return(false)><td>no</table> ¿ÉÓÃÓÚTable
2. <body onselectstart="return false"> È¡Ïûѡȡ¡¢·ÀÖ¹¸´ÖÆ
3. onpaste="return false" ²»×¼Õ³Ìù
4. oncopy="return false;" oncut="re ......

javascript½¨±í

 <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head ru ......

JavaScript ͼÏñµØÍ¼

 
ͼÏñµØÍ¼Ö¸µÄÊÇ´øÓпɵã»÷ÇøÓòµÄͼÏñ¡£
ʵÀý
¼òµ¥µÄ HTML ͼÏñÓ³Éä
±¾ÀýÑÝʾһ·ùûÓÐÌí¼Ó JavaScript µÄͼÏñÓ³Éä¡£
Ìí¼ÓÁË JavaScript µÄͼÏñÓ³Éä
±¾ÀýÑÝʾһ·ùÌí¼ÓÁË JavaScript µÄͼÏñÓ³É䣬µ±Êó±ê¸¡¶¯ÓÚij¸öÈȵãÉÏʱ£¬»áµ÷Óà JavaScript º¯ÊýÀ´ÏÔʾÈȵãËù¶ÔÓ¦µÄÐÇÇòµÄ¼ò½é¡£
JavaScript ͼÏñµØÍ¼
ÎÒÃÇÒѾ ......

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

JavaScript »ñÈ¡¿Í»§¶Ë¼ÆËã»úÓ²¼þ¼°ÏµÍ³ÐÅÏ¢
ͨ¹ýWMIÀ´ÊµÏÖ»ñÈ¡¿Í»§¶Ë¼ÆËã»úÓ²¼þ¼°ÏµÍ³ÐÅÏ¢:
1//ϵͳÐÅÏ¢»ñÈ¡
2function getSysInfo(){
3 var locator = new ActiveXObject ("WbemScripting.SWbemLocator");
4 var service = locator.ConnectServer(".");
5 //CPUÐÅÏ¢
6 var cpu = new Enu ......

javascript object array string converter

 function object2String(obj)
{
var val, output = "";
if (obj)
{
output += "{";
for (var i in obj)
{
val = obj[i];
switch (typeof val)
{
case ("object"):if (val[0]){output += i + ":" + array2String(val) + &qu ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ