一区二区久久-一区二区三区www-一区二区三区久久-一区二区三区久久精品-麻豆国产一区二区在线观看-麻豆国产视频

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 對象介紹,轉載需保留來源!

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

主站蜘蛛池模板: 久久久久久久久久综合情日本 | 亚洲国产精品激情在线观看 | 131美女一区二区三区视频 | 91频视| 婷婷精品视频 | 国内精品久久久久久不卡影院 | 99久久99久久 | 久久ww精品w免费人成 | 欧美成人天天综合天天在线 | 真实国产乱子伦精品免费 | 亚洲精品国产精品乱码不97 | 欧美在线一二三区 | 日本高清色视频在线观看免费 | 国产精品12p | 欧美日韩亚洲国产一区二区三区 | 精品精品久久宅男的天堂 | 夜夜夜夜夜夜夜猛噜噜噜噜噜噜 | 丝袜综合网 | 国产成人小视频在线观看 | 久久艹伊人 | 国产在线干| 国产97色在线中文 | 国产精品国产午夜免费福利看 | 影音先锋国产资源 | 美女张开腿让男人桶爽免费看 | 在线看一区二区 | 色网站免费观看 | 国产极品在线观看 | 欧美成人午夜视频 | 男人猛桶女人下面视频国产 | 国产福利免费观看 | 午夜剧场刺激性爽免费视频 | 91精品国产色综合久久不卡蜜 | 久久精品网 | 日韩亚洲一区中文字幕在线 | 色偷偷尼玛图亚洲综合 | 国内精品自在自线2020 | 婷婷成人亚洲 | 国产精品青草久久久久福利99 | 多人伦精品一区二区三区视频 | 色多多免费在线观看 |