JavascriptÖеÄÀûÓÃÔÐÎÁ´ºÍ¶ÔÏóð³ä´´½¨Àà
¿´µ½Ò»¸öÔø¾¸ã¹ýwebµÄÈ˵ÄblogÖÐ˵µ½Èç¹ûѧJavascript²»¶®ÔÐÎÁ´£¬¾ÍÌ«Òź¶ÁË£¬ËùÒÔµ±×Ô¼º¿´¡¶javascript¸ß¼¶³ÌÐòÉè¼Æ¡·Ê±¾ÍÁôÒâÁËһϣ¬ËµÊµ»°£¬ÏÂÃæµÄ´úÂëºÜ¼òµ¥£¬µ«ÊDz»ÊǺܶ®ËùνµÄÔÐÎÁ´ºÍ¶ÔÏóð³äÖ®ÀàµÄ¶«Î÷ <!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>
<meta content="text/html; charset=gb2312" http-equiv="Content-Type" />
<title>¼Ì³Ð»úÖÆµÄʵÏÖ--ʵÀý</title>
<script type="text/javascript">
function Polygon(iSides){
this.sides=iSides;
}
Polygon.prototype.getArea=function(){
return 0;
};
function Triangle(iBase,iHeight){
Polygon.call(this,3);
this.base=iBase;//ÉèÖûù±¾µÄ±ßÊý
this.height=iHeight;
}
Triangle.prototype=new Polygon();
Triangle.prototype.getArea=function(){
return 0.5*this.base*this.height;
};
function Rectangle(iWidth,iHeight){
Polygon.call(this,4);
this.width=iWidth;
this.height=iHeight;
}
Rectangle.prototype=new Polygon();
Rectangle.prototype.getArea=function(){
return this.width*this.height;
};
var triangle=new Triangle(12,4);
var rectangle=new Rectangle(22,10);
alert("Èý½ÇÐεıß
Ïà¹ØÎĵµ£º
///ÏÂÃæÊǶÔAccessµÄÁ´½Ó
function getCountfromDB() {
//ÒÔµ±Ç°Ò³ÃæÎļþΪ»ù´¡£¬ÕÒµ½ÎļþËùÔڵľø¶Ô·¾¶¡£
var filePath = location.href.substring(0, location.href.indexOf("Cnt.htm"));
var path = filePath + "MyData.mdb";
//È¥µ ......
Ò»¡¢¹¦ÄÜʵÏÖºËÐÄ£ºFileSystemObject ¶ÔÏó
ÒªÔÚjavascriptÖÐʵÏÖÎļþ²Ù×÷¹¦ÄÜ£¬Ö÷Òª¾ÍÊÇÒÀ¿¿FileSystemobject¶ÔÏó¡£
¶þ¡¢FileSystemObject±à³Ì
ʹÓÃFileSystemObject ¶ÔÏó½øÐбà³ÌºÜ¼òµ¥£¬Ò»°ãÒª¾¹ýÈçϵIJ½Ö裺 ´´½¨FileSystemObject¶ÔÏó¡¢Ó¦ÓÃÏà¹Ø·½·¨¡¢·ÃÎʶÔÏóÏà¹ØÊôÐÔ ¡£ ......
ÉÏ»ØËµµ½£¬²Ù×÷Object Array
Æäʵ»¹¿ÉÒÔÕâÑù²Ù×÷£º
var Room = [
{
ID: 'bot',
name: 'test' ......
¶ÔÏó³õʼ»¯·½Ê½(Ò²½Ðjson¶ÔÏó´´½¨·½Ê½)
<script type="text/javascript">
var User = {
name:"centerqi",
age:25,
toString:function()
  ......
/* ·½·¨:Array.remove(dx)
* ¹¦ÄÜ:ɾ³ýÊý×éÔªËØ.
* ²ÎÊý:dxɾ³ýÔªËØµÄϱê.
* ·µ»Ø:ÔÚÔÊý×éÉÏÐÞ¸ÄÊý×é
*/
//¾³£ÓõÄÊÇͨ¹ý±éÀú,ÖØ¹¹Êý×é.
Array.prototype.remove=function(dx)
{
if(isNaN(dx)||dx>this.length){return false;}
for(var i=0,n=0;i<this.length;i++)
{
......