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

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

主站蜘蛛池模板: 一区二区三区在线播放视频 | 午夜国产福利在线 | 日日摸人人看97人人澡 | 成年网站在线播放 | 人人做人人爽人人爱秋霞影视 | 日韩理论在线播放 | 亚洲国产天堂久久综合图区 | 国产大片好看免费播放 | 7799国产精品久久久久99 | 国产日韩精品一区在线不卡 | 真实国产伦在线视频免费播放 | 中文字幕日本一本二本三区 | 国产亚洲视频在线播放大全 | 精品精品久久宅男的天堂 | 国产网站免费视频 | 黄色美女视频网站 | 国产手机在线精品 | 国产色中色 | 亚洲精品在线网站 | 精品国产一区二区三区19 | 国产第2页 | 久青草国产手机视频免费观看 | 久久精品国产99国产 | 精品欧美亚洲韩国日本久久 | 天天干天天干天天 | 国产91成人精品亚洲精品 | 国产原创精品 | 99pao强力打造免费高清色 | 国产成人精视频在线观看免费 | 国产麻豆免费 | 成人福利网站 | 免费视频国产 | 国产精品乱码在线观看 | 国产视频一区二区 | 婷婷色亚洲 | 欧美日韩免费大片 | 一区二区3区免费视频 | 韩国三级久久网 | 日本伊人色综合网站 | 女的毛片毛片毛毛片毛毛毛毛片 | 91成人免费视频 |