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

Javascriptѧϰ±Ê¼ÇÒ» ¶ÔÏó

 ¼ìË÷:
1 ÓÃ||À´Ìî³äĬÈÏÖµ
var status = flight.status || "unknown";
2 ʹÓÃ&&·ÀÖ¹TypeError
flight.equipment.model //throw "TypeError"
flight.equipment && flight.equipment.model //undefined

ÒýÓÃ
var a={},b={},c={};
document.writeln(a===b); //false
Ô­ÐÍ
JavascriptÌṩµÄʵÏÖ»úÖÆ£º
var stooge = {
"first-name":"Jerome",
"last-name":"Howard"
};
var temp = function(){};
temp.prototype=stooge;
var another_stooge= new temp;
¿ÉÒÔÖ±½Ó¸øObject¼Ó¸ö·½·¨À´¼ò»¯
if (typeof Object.beget !== 'function'){
Object.beget = function (o){
var F = function (){};
F.prototype = o;
return new F();
}
}
var another_stooge =Object.beget(stooge);
another_stooge["first-name"] = 'Harry';
document.writeln(another_stooge["first-name"]); //Harry
document.writeln(another_stooge["last-name"]); //Howard
document.writeln(stooge["first-name"]); //Jerome

·´Éä
typeof¿ÉÒÔ·ÃÎÊÔ­ÐÍÁ´
document.writeln(typeof flight.toString); //function
hasOwnPropertyÔò²»ÐÐ
 document.writeln(flight.hasOwnProperty('toString')); //false
ö¾Ù
ʹÓÃfor inö¾ÙÊôÐÔ µÄ˳ÐòÊDz»È·¶¨µÄ£¬¶øÇÒÐèҪʹÓÃhasOwnProperty£¬²¢Ê¹ÓÃtypeofÅųýº¯Êý
×îºÃ
var properties = [
"first-name",
"last-name"
];
for (var i = 0; i < properties.length; i+=1){
document.writeln(properties[i] + ": " + stooge[properties[i]]);
}
ɾ³ý
ɾ³ý²»»á´¥¼°Ô­ÐÍÁ´£¬É¾³ý¶ÔÏóÊôÐÔ£¬Ô­ÐÍÁ´µÄÊôÐÔ¸¡ÏÖ³öÀ´
anothet_stooge["first-name"] = "Jack";
document.writeln(anothet_stooge["first-name"]);//Jack
delete anothet_stooge["first-name"];
document.writeln(anothet_stooge["first-name"]);//Jerome
ÃüÃû¿Õ¼ä
var MYAPP= {}£»
MYAPP.stooge = {
//...
};


Ïà¹ØÎĵµ£º

JSONÊÇʲô£¿ÎªJavaScript×¼±¸µÄÊý¾Ý¸ñʽ

»¹²»Á˽âJSONÊÇʲô?¿´ÁËÏÂÃæÕâÆªÎÄÕ£¬Äú¶ÔJSONÊÇʲôӦ¸ÃÄܹ»ÓÐÁËÒ»¸ö±È½ÏÇåÎúµÄ¸ÅÄî¡£
¡¡¡¡JSON ¼´ JavaScript. Object Natation£¬ËüÊÇÒ»ÖÖÇáÁ¿¼¶µÄÊý¾Ý½»»»¸ñʽ£¬·Ç³£ÊʺÏÓÚ·þÎñÆ÷Óë JavaScript. µÄ½»»¥¡£±¾ÎĽ«¿ìËÙ½²½â JSON ¸ñʽ£¬²¢Í¨¹ý´úÂëʾÀýÑÝʾÈçºÎ·Ö±ðÔÚ¿Í»§¶ËºÍ·þÎñÆ÷¶Ë½øÐÐ JSON ¸ñʽÊý¾ÝµÄ´¦Àí¡£
¡¡¡¡¾¡¹ ......

Javascript Windows MediaPlayerÍêÕûʾ·¶°æ

Ò»¡¢Ö÷Ò³Ãæ(²ÉÓÃjspʵÏÖ)
<%@ page language="java" contentType="text/html; charset=gb2312"
pageEncoding="gb2312"%>
<%@page import="org.accp.jwebplayer.biz.MusicBiz"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<h ......

¸øGridView¼ÓÁ½¸öjavascriptÌØÐ§

ÔÚÊý¾Ý°ó¶¨Ê¼þÖÐдÈçÏ´úÂ룺
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row .RowType == DataControlRowType .DataRow)//ÅжÏÊÇ·ñΪÊý¾ÝÐÐ
{
//ÔÚµã»÷ɾ³ýʱ£¬µ¯³öÌáʾ¶Ô»°¿ò
LinkButton lb = e.Row.FindControl("LinkB ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ