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("Èý½ÇÐεıß
Ïà¹ØÎĵµ£º
JavaScript ÓÐÁùÖÖÊý¾ÝÀàÐÍ¡£Ö÷ÒªµÄÀàÐÍÓÐ number¡¢string¡¢object ÒÔ¼° Boolean ÀàÐÍ,ÆäËûÁ½ÖÖÀàÐÍΪ null ºÍ undefined¡£
¡¡¡¡ String ×Ö·û´®ÀàÐÍ:×Ö·û´®ÊÇÓõ¥ÒýºÅ»òË«ÒýºÅÀ´ËµÃ÷µÄ¡££¨Ê¹Óõ¥ÒýºÅÀ´ÊäÈë°üº¬ÒýºÅµÄ×Ö·û´®¡££©È磺“The cow jumped over the moon.”
ÊýÖµÊý¾ÝÀàÐÍ£ºJavaScript Ö§³ÖÕûÊýºÍ¸¡µã ......
///ÏÂÃæÊǶÔAccessµÄÁ´½Ó
function getCountfromDB() {
//ÒÔµ±Ç°Ò³ÃæÎļþΪ»ù´¡£¬ÕÒµ½ÎļþËùÔڵľø¶Ô·¾¶¡£
var filePath = location.href.substring(0, location.href.indexOf("Cnt.htm"));
var path = filePath + "MyData.mdb";
//È¥µ ......
<!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 runat="server">
<title>ÎÞ±êÌâÒ³</title>
</head>
<body>
<form id ......
1 Ò»ÆðÀ§»óʼÓÚ±äÁ¿µÄ×÷ÓÃÓò
ÇëÏÈ¿´ÏÂÃæµÄ´úÂ룺
ʾÀý1£º
var message = " this is a very simple function ";
function simpleFunc(){
alert(message);
}
±³ºóµÄµÀÀí´ó¼Ò¶¼¶®£¨Èç¹û²»¶®µÄ¿ÉÒÔÏȱðÍù ......
×î½üÒ»Ö±ÔÚÓÃjavascriptÔÚ×öÏîÄ¿
¿ÉÊÇ×ö×Å×ö×Å
¸Ð¾õºÜ¶à¹¦ÄÜ´úÂë¶¼ÊÇÖØ¸´µÄ¡£
±ÈÈç¶ÔjavascriptÊý×éµÄÅÅÐò
»¹ÓжÔÊý×éÊý¾ÝµÄɾѡÒÔ¼°·Ö×é
ËùÒÔ£¬ºóÀ´ÐËÖÂÒÔÉÏÀ´¡£
Ò»·¢²»¿ÉÊÕʰ¡£
дÁËÒ»¸öÄÜÔÚjavascriptÖÐÓ¦ÓÃµÄ SQL ¿â
ºóÀ´ÓÖÏ룬Ôõô²»ÄÜÓÃjavascriptÖ±½ÓÁ¬½ÓÊý¾Ý¿âÄØ£¿
ÓÖ×öÁËÒ»¸öjavascriptÖ±Á¬SqlÊý¾ÝµÄÀà¿â ......