?????? ???
JavaScript ???? ???? ???? ???? ? ?????.
JavaScript ???
???? "liu qi"? ?? ??? ??? ??? ? ????.
???? ??? ?? ??? ?? ??? ? ????. ????? ?? ????? ??? ? ????.
var carname = "????";
var carname = '?????';
?? ??? ???? ???? ? ??? ???? ? ????.
var ?? = carname[7];
???? ???? 0?? ?????. ?, ? ?? ?? ??? ?? [0], ? ?? ?? ??? ?? [1] ????.
???? ???? ??? ? ????. ???? ???? ???? ???? ??? ???.
var Answer = "It's alright";
var Answer = "He is been ' Johnny'";
var ?? = '?? "Johnny"?? ????';
???? ????? ??? ???? ???? ??? ?? ????.
Example
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>php中文網(wǎng)(php.cn)</title> </head> <body> <p id="demo"></p> <script> var x = 'It\'s alright'; var y = "He is called \"Johnny\""; document.getElementById("demo").innerHTML = x + "<br>" + y; </script> </body> </html>
????? ???? ??? ???
??? ??
?? ?? ?? ??? ???? ??? ??? ??? ? ????.
Example
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>php中文網(wǎng)(php.cn)</title> </head> <body> <script> var txt = "Hello World!"; document.write("<p>" + txt.length + "</p>"); var txt="ABCDEFGHIJKLMNOPQRSTUVWXYZ"; document.write("<p>" + txt.length + "</p>"); </script> </body> </html>
????? ???? ??? ???
?? ??
JavaScript??? ???? ?????? ??? ????? ????.
? ??? ?? ?? JavaScript? ?? ??? ? ????.
?? ??? ???? ??? ?????? ??? ?? ????()? ???? "Vikings" ????? ????? ?????? ? ????."We are the ?? "Vikings" from the north."
????? ??? ???? ????????. . ????? ??? ?? ??? ??? ??? ?????.
????? ??()? ??????, ??, ??? ? ?? ?? ??? ??????? ? ??? ? ????.
?? ??? ????? ????? ??? ???? ?????? ? ?? ?? ??? ???? ????.??? ?? ? ???
Code output ' ????? " ???? \ ???? n ? ?? r Enter???? ??? ? ???? ????? JavaScript ???? ?? ??? ??? ???? ??? ? ????: var firstName = "John" ??? ??? ??? var? ???? ???? ??? ??? ?? ????. firstName = new String("John" ) <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>php中文網(wǎng)(php.cn)</title> </head> <body> <p id="demo"></p> <script> var x = "John"; // x是一個字符串 var y = new String("John"); // y是一個對象 document.getElementById("demo").innerHTML =typeof x + " " + typeof y; </script> </body> </html>????? ???? ??? ??? ?? : String ??? ??? ???. ?? ??? ???? ?? ???? ??? ? ????.<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>php中文網(wǎng)(php.cn)</title> </head> <body> <p id="demo"></p> <script> var x = "John"; // x 是字符串 var y = new String("John"); // y 是一個對象 document.getElementById("demo").innerHTML = x===y; </script> <p>=== 為絕對相等,即數(shù)據(jù)類型與值都必須相等。</p> </body> </html>????? ???? ??? ???. it === ????? ?????. ?, ??? ??? ?? ?? ???? ???. "John"? ?? ?? ? ????? ???? ????. ?? ? ???(??? ??? ???) ?? ?? JavaScript? ??? ? ????. JavaScript? ??? ? ??? ??? ? ?? ?? ??? ??? ? ?? ?????.
???? ??? ??? ??????. Chapters
Properties
Descriptionconstructor??? ??? ???? ??? ?????length
???? ??? ?????
prototype
? ???? ??? ? ????. ??? ??? ???
??? ???
Method Description charAt() ??? ??? ??? ?? ??? ????? charCodeAt() ??? ??? ??? ?? ??? ???? ?? ????? cat() connection ? ? ??? ???, ??? ??? ?? fromCharCode() ????? ???? ?? indexOf() ????? ??? ??? ?? ???? ?? ?????. lastIndexOf() ????? ??? ??? ????? ???? ??? ?????. localeCompare() ? ???? ?? ?? ??? ?? match() ?? ?? ??? ??? ?? replacement() ???? ???? ?? ??? ??? search() ???? ???? ? ?? Slice() ??? ??? ???? ??? ??? ? ???? ?? Split() ???? ?? ??? ??? ?? substr() ????? ??? ?? ?? ?? ?? ?? ???? substring() ????? ??? ? ?? ?? ??? ??? ????? toLocaleLowerCase() ??? ??? ??? ?? ???? ???? ?????. ??? ??(?: ???)?? ??? ???? ??? ????. toLocaleUpperCase() ???? ???? ?? ???? ???? ?????. ?? ??(?: ???)?? ??? ???? ??? ????. toLowerCase() ???? ???? ?? toString() ??? ?? ?? ?? toUpperCase() ???? ???? ?? r Trim () ?? ? ?? ??? ??? ?? valueof () ??? ??? ?? ??? ?? ???? ??||<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>php中文網(wǎng)(php.cn)</title> </head> <body> <p id="demo"></p> <script> var x = 'It\'s alright'; var y = "He is called \"Johnny\""; document.getElementById("demo").innerHTML = x + "<br>" + y; </script> </body> </html>
- ?? ??
- ???? ????
![]()
????JavaScript ?? ????
9245?? ???? ????.![]()
????JQuery ?? ?? ????
41602?? ???? ????.![]()
????Python ?? ?? ????
129154?? ???? ????.![]()
????RSS ???? ?? ????
7399?? ???? ????.![]()
????HTML5 ?? ?? ????
14069?? ???? ????.![]()
????PHP ?? ?? ?? ????
176456?? ???? ????.![]()
????HTML+CSS ?? ?? ????
82953?? ???? ????.![]()
????CSS 0 ?? ?? ????
24679?? ???? ????.![]()
????PHP ?? ??? ?? ????
19203?? ???? ????.![]()
????2017? ?? jQuery ?? ????
7772?? ???? ????.![]()
????HTML/CSS 5?? ?? ?? ????
26681?? ???? ????.![]()
????Python ????? ?? ??? ???? ???
36033?? ???? ????.?? ????? ????? ? ????. ?? ???? ???? ????. ???? ? ??? ?? ?? ??????~? ??? ??? ???? ???? ????.
- PHP? ??? ???? ??? ?? ??? ???? ?????.
- ? ??? ?? ??? ?? ?? ??
- ??? ?? ???? ???? ??? Mini ?? MVC ?????? ??? ?? Tianlongbabu ??
- PHP ?? ?? ????: ?? PHP ?? [???? ??]
- ??? ?? ? ??? ???
- ??? ???? ?? ??
- ?? ?? Node.JS ?? ??
- ??? ?? ? ???? ????? ??: HTML5/CSS3/ES6/NPM/Vue/...[??]
- ???? PHP MVC ????? ??(?? ?? 40? ?/??? ??/???? ????? ??? ?)