ExtJs??椋?缃?瀛???葷?
1.?????? JavaScript?版??绫誨????
杞???負Number锛??規??parseInt()?ヨ漿????
杞???tring锛?浠諱?绫誨????瀛?绗?覆?充負瀛?绗?覆??
杞???oolean锛?true,false,??????0?闆??涓?rue,????涓?alse
Undefind? / null ?存?ヨ漿??負false
?
2.?????? JavaScript?版??涓???
??烘???版??绫誨?????ㄥ?間???锛?
?
3.?????? JavaScript璇?娉?? ?芥?頒?浜?浠?
?芥?闆??浜?浠堕??甯告??涓?绉?缁?瀹??崇郴锛???杩?浜?浠惰??ㄥ?芥?般??濡???缁?瀹?澶?涓??芥?幫?涓??寸?ㄥ???烽??寮???
l?????? 甯哥?ㄤ?浠?
l?????? Onload
l?????? OnClick
l?????? MouseOver 榧???绉誨?ㄥ?版??瀹?????涓?
l?????? MouseOut 榧???绂誨???瀹?????
l?????? Focus 褰???绱??峰?????
l?????? Blur 褰???绱?澶卞?葷????
l?????? Change 1.杈??ュ??瀹瑰?????瑰??锛?2.select??椤瑰?????瑰??
l?????? Onkeyup ????妗?浠跺脊璧?
l?????? 甯哥?ㄤ?浠?
l?????? Onload
l?????? OnClick
l?????? MouseOver 榧???绉誨?ㄥ?版??瀹?????涓?
l?????? MouseOut 榧???绂誨???瀹?????
l?????? Focus 褰???绱??峰?????
l?????? Blur 褰???绱?澶卞?葷????
l?????? Change 1.杈??ュ??瀹瑰?????瑰??锛?2.select??椤瑰?????瑰??
l?????? Onkeyup ????妗?浠跺脊璧?
?
4.?????? JavaScript?㈠??瀵矽薄缂?绋?
JavaScript瀹?涔?灞??у???規?
?規?涓?锛?
|
?
? ?規?浜?锛?
|
?葷?:
瀹?涔?灞??э??規? 1.浣跨??rototype??寤? 2.浣跨??his??寤? ? |
?
5.?????? Json???瑰???寤哄?矽薄
|
?
|
?
Json瀵矽薄????浠ヤ?????
????锛?JSON??浠ュ?ㄥ??绗?覆??瀵矽薄?磋漿???? ??浠ラ??杩?JavaScript??eval锛?)?規?灏?瀛?绗?覆杞??㈡??瀵矽薄?? |
?
6锛??ㄦ??娣誨??灞??у???規?
|
?
7.?ㄥ??缃?瀵矽薄娣誨??灞??у???規?
?
?
8.Javascript?㈠??瀵矽薄涓???缁ф??
|
?
9锛?瀹?涔?绉???灞???
|
?
10.瀹?涔?????灞???
|
?
?
11.Json瀵矽薄
瀹?涔?Json瀵瑰?矽薄锛??ㄥ?矽薄涓?娣誨??灞??э?
|
Json娣誨???規?锛?
|
Json娣誨??瀛?瀵矽薄锛?
|
?ㄦ?ゅ?涔?涓?涓??????規?
|
浠ヤ?璋???est.cityName蹇?椤誨????test瀹?渚???涓?涓?锛?
|
?葷?锛?
Javascript?㈠??瀵矽薄???????㈠??瀵矽薄缂?绋?璇?瑷?涓??鳳??芥????杩?瀹?渚??????瑰?杩?琛?璁塊??锛?涓や釜瀵矽薄?寸????????????涓?浼?琚?骞叉?般?? JSON涓?锛?灞??у??浠ユ???規?锛????沖??浠ユ??涓?涓?瀛?瀵矽薄?? 浣跨?ㄩ????????锛???瑕?瀹?渚???涓?涓?function锛???璇?娴?瑙??ㄥ??涓????芥?幫?????瀵矽薄?? ? |
?
12.?規?瑕???
|
?
13.????window.alert();??绀烘?
|
?
琛ュ??锛?javascript澶??剁戶?挎?
<mce:script type="text/javascript"><!--
function dw(s){
alert(s);
}
Function.prototype.extend_p = function(obj){
for(var i in obj){
this.prototype[i] = obj[i];
}
}
Person = function(){
this.name = "accp";
this.setName = function(obj){
this.name = obj;
}
this.getName = function(){
return this.name;
}
}
Student = function(){
}
Student.extend_p(new Person());
var s = new Student();
s.setName('榛?缈?');
dw(s.getName());
// --></mce:script>
?
<!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 http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>javascript??濮?缁ф?挎?</title>
<mce:script type="text/javascript"><!--
function ds(s){
alert(s);
}
Person = function(){
this.name = "hy";
this.setName = function(obj){
this.name = obj;
}
this.getName = function(){
return this.name;
}
}
Student = function(){
this.stuNo = "0001";
}
Student.prototype = new Person();
var stu = new Student();
stu.setName('榛?缈?');
alert("??瀛?锛?"+stu.getName());
alert("缂??鳳?"+stu.stuNo);
// --></mce:script>
</head>
<body>
</body>
</html>