¡¶Îò͸javascript¡·Ñ§Ï°±Ê¼Ç£ºÈý¡¢ËÆÀàÈ´²»ÊÇÀà
ÒýÑÔ
JavaScriptûÓÐ “Àà”µÄ¸ÅÄÕâÈúܶàѧϰ¹ý¸ß¼¶ÓïÑÔµÄÈ˸е½ºÜ²»Ë¬£¬Æäʵ±ÈÖ®ÓÚCÓïÑÔÓÖÈçºÎÄØ£¿ÏÔÈ»JavaScriptÒª±ÈCÓïÑÔºÃÓúܶࡣ
²»·Ï»°£¬ÉÏ´úÂë
<script language="javascript">
/*Ò»¾ä¾äµÄ¿´¸üÈÝÒ×Ã÷°×*/
//ÉùÃ÷Ò»¸ö¶ÔÏ󣬵«Ëüʲô¶¼Ã»ÓÐ
var life = {};
//ÈκÎʱºò¿ÉÒÔËæÒâµØ¸Ä±ä¶ÔÏóµÄÊôÐÔ»òº¯Êý£¬lifeºóÖ±½Ó½Ó.age£¬Ëü¾ÍÓÐÁËageÊôÐÔ
for(life.age = 1; life.age <= 3; life.age++)
{
switch(life.age)
{
case 1: life.body = "ÂÑϸ°û"; //ageΪ1ʱ£¬ÐÂÔöÒ»¸öbodyÊôÐÔ²¢¸³Öµ
life.say = function(){alert(this.age+this.body)}; //ÐÂÔösay·½·¨
break;
case 2: life.tail = "β°Í"; //ÐÂÔötailÊôÐÔ
life.gill = "Èù"; //ÐÂÔögillÊôÐÔ
life.body = "òòò½"; //ÐÞ¸ÄbodyÊôÐÔµÄÖµ£¬ÒòΪbodyÔÚÉÏÃæÒѾÐÂÔöÁË£¬ËùÒÔÕâÀïÊÇÐÞ¸Ä
life.say = function(){alert(this.age+this.body+"-"+this.tail+","+this.gill)}; //ÐÞ¸Äsay·½·¨
break;
case 3: delete life.tail; //ɾ³ýtailÊôÐÔ
delete life.gill;
Ïà¹ØÎĵµ£º
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>FLYSO Blog-- JS´úÂëʵÏÖµÄ×Ô¶¯·ÖҳЧ¹û~!</TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT=""& ......
ÔÚJavascriptÖÐûÓÐclassÀ࣬µ«ÊÇͬÑùÒ²¿ÉÒÔ½øÐжÔÏóµÄ´´½¨¡£ÔÚÃæÏò¶ÔÏóµÄÓïÑÔÖÐÐèҪʵÀý»¯Ä³¸ö¾ßÌåÀàµÄʵÀý£¬ÔÚJavascriptÖÐÔò²»Óá£
ÔÚJavascriptÀ¶ÔÏñ¿ÉÒÔ´´½¨ÐµĶÔÏó£¬Ò²¿ÉÒԼ̳Ð×ÔÆäËû¶ÔÏó¡£Õâ¸ö¸ÅÄî³ÆΪÔÐÍ»¯¼Ì³Ð(prototypal inheritance)¡£
Èκκ¯ÊýÔÚJavascript Öж¼¿ÉÒÔ±»ÊµÀý»¯Ò»¸ö¶ÔÏó¡£
³ÌÐòÈçÏ£º
// ......
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="login.aspx.cs" Inherits="login" %>
<!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="serve ......
C#´úÂëÓëjavaScriptº¯ÊýµÄÏ໥µ÷ÓÃ
ÎÊ£º
1.ÈçºÎÔÚJavaScript·ÃÎÊC#º¯Êý?
2.ÈçºÎÔÚJavaScript·ÃÎÊC#±äÁ¿?
3.ÈçºÎÔÚC#ÖзÃÎÊJavaScriptµÄÒÑÓбäÁ¿?
4.ÈçºÎÔÚC#ÖзÃÎÊJavaScriptº¯Êý?
ÎÊÌâ1´ð°¸ÈçÏ£º
javaScriptº¯ÊýÖÐÖ´ÐÐC#´úÂëÖеĺ¯Êý£º
·½·¨Ò»£º1¡¢Ê×ÏȽ¨Á¢Ò»¸ö°´Å¥£¬ÔÚºǫ́½«µ÷Óûò´¦ÀíµÄÄÚÈÝдÈëbutton_clickÖÐ ......
¡¶Îò͸JavaScript¡·Ñ§Ï°±Ê¼Ç
ÔÎĵØÖ·£ºhttp://www.cnblogs.com/leadzen/archive/2008/02/25/1073404.html
ÕâÊÇÒ»±¾ºÜÐÎÏóÉú¶¯µÄÊ飬ʹÎÒÃÇ¿ÉÒÔ¸üÉîµØÁ˽âÁËJavaScript¡£
ÒýÑÔ
±à³ÌÊÀ½çÀïÖ»´æÔÚÁ½ÖÖ»ù±¾ÔªËØ£¬Ò»¸öÊÇÊý¾Ý£¬Ò»¸öÊÇ´úÂë¡£±à³ÌÊÀ½ç¾ÍÊÇÔÚÊý¾ÝºÍ´úÂëǧ˿ÍòÂƵ ......