中文字幕日韩一区二区_国产一区二区av_国产毛片av_久久久久国产一区_色婷婷电影_国产一区二区精品

JS 對象介紹

JavaScript is an Object Oriented Programming (OOP) language.
JS是面向對象的編程語言(面向對象)。 (這里是基于對象還是面向對象大家可以搜索下)
An OOP language allows you to define your own objects and make your own variable types.
OOP語言可以讓你自定義對象和變量類型。

--------------------------------------------------------------------------------
Object Oriented Programming
被安置對象的編程
JavaScript is an Object Oriented Programming (OOP) language. An OOP language allows you to define your own objects and make your own variable types.
JS是(OOP)語言,這就可以讓你定義....(和上面的重復)
However, creating your own objects will be explained later, in the Advanced JavaScript section. We will start by looking at the built-in JavaScript objects, and how they are used. The next pages will explain each built-in JavaScript object in detail.
然而,我們將晚些在高級JS里介紹建立自定義對象。我們將開始觀察內建JS對象和如何使用它們。下頁將詳細介紹每個內建JS對象
Note that an object is just a special kind of data. An object has properties and methods.
注意,對象只是特殊類型的數據。對象有屬性和方法

--------------------------------------------------------------------------------
Properties
屬性
Properties are the values associated with an object.
屬性是對象的相連值
In the following example we are using the length property of the String object to return the number of characters in a string:
下面的例子我么使用了字符串對象的長度屬性來返回字符的數量:
<script type="text/Javascript">
var txt="Hello World!"
document.write(txt.length)
</script>
The output of the code above will be:
上面的代碼就會輸出:
12

--------------------------------------------------------------------------------
Methods
方法
Methods are the actions that can be performed on objects.
對象的方法可以執行行為。
In the following example we are using the toUpperCase() method of the String object to display a text in uppercase letters:
下面的例子使用了字符串對象的toUpperCase()方法來顯示出文字的大寫:
<script type="text/Javascript">
var str="Hello world!"
document.write(str.toUpperCase())
</script>
The output of the code above will be:
上面的代碼輸出:
HELLO WORLD!

JavaScript技術JS 對象介紹,轉載需保留來源!

鄭重聲明:本文版權歸原作者所有,轉載文章僅為傳播更多信息之目的,如作者信息標記有誤,請第一時間聯系我們修改或刪除,多謝。

主站蜘蛛池模板: 中文字幕一二三 | 精品福利一区二区三区 | 免费网站国产 | 在线欧美一区二区 | 97精品超碰一区二区三区 | 一区二区三区视频免费观看 | 国产九九九 | 狠狠操婷婷 | 四虎影院在线免费观看 | 亚洲一区二区中文字幕 | 精品久久久久久亚洲综合网站 | 美女天堂在线 | 一道本不卡| 久久久久国产一级毛片高清网站 | 欧美在线国产精品 | 青青草中文字幕 | 91精品国产777在线观看 | 久久99深爱久久99精品 | 欧美视频一区二区三区 | 成人在线免费观看 | 超碰在线国产 | 中文字幕在线精品 | 成人不卡一区二区 | 黄色日本视频 | 久久这里只有精品首页 | 国产精品一区二区三区久久久 | 中文字幕国产精品视频 | 欧美电影在线观看网站 | 国产亚洲欧美日韩精品一区二区三区 | 亚洲欧美在线视频 | 日韩视频精品在线 | 免费久草| 亚洲永久精品国产 | 91一区 | www.五月婷婷.com | 九色91视频 | 国产在线精品一区二区 | 国产成人精品a视频 | 中文字幕人成乱码在线观看 | 操久久| 一区二区激情 |