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

JS 對象介紹

JavaScript is an Object Oriented Programming (OOP) language.
JS是面向?qū)ο蟮木幊陶Z言(面向?qū)ο螅?(這里是基于對象還是面向?qū)ο蟠蠹铱梢运阉飨拢?BR>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)語言,這就可以讓你定義....(和上面的重復(fù))
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里介紹建立自定義對象。我們將開始觀察內(nèi)建JS對象和如何使用它們。下頁將詳細(xì)介紹每個內(nèi)建JS對象
Note that an object is just a special kind of data. An object has properties and methods.
注意,對象只是特殊類型的數(shù)據(jù)。對象有屬性和方法

--------------------------------------------------------------------------------
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:
下面的例子我么使用了字符串對象的長度屬性來返回字符的數(shù)量:
<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.
對象的方法可以執(zhí)行行為。
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技術(shù)JS 對象介紹,轉(zhuǎn)載需保留來源!

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

主站蜘蛛池模板: 妖精视频一区二区三区 | 国产高清视频在线播放 | 亚洲一区 中文字幕 | 免费在线观看一区二区三区 | 欧美不卡一区二区三区 | 亚洲一区二区精品视频 | www.日本三级| 福利网址| 国产精品一区在线 | 波多野结衣二区 | 亚洲人成在线播放 | 国产精品乱码一区二区三区 | 激情欧美一区二区三区中文字幕 | 国产亚洲一区二区精品 | 一区二区精品 | 亚洲精品一区中文字幕乱码 | 国产视频中文字幕 | 国产美女特级嫩嫩嫩bbb片 | 黄色亚洲网站 | 欧美2区 | 国产精品久久久久久吹潮 | 四虎成人精品永久免费av九九 | 最新日韩在线 | 韩日一区二区三区 | 日韩一级 | 国产精品一区二区av | 黄色大片免费看 | 亚洲激情一区二区 | 精品亚洲一区二区三区四区五区 | 久久精品中文 | 成人一级毛片 | 亚洲激情一区二区三区 | 精品国产乱码久久久久久丨区2区 | 精品国产一区二区三区观看不卡 | 成人国产精品入口免费视频 | 青草久久免费视频 | 九九亚洲 | 午夜在线小视频 | 欧美激情精品久久久久久变态 | www国产成人免费观看视频 | 一级黄a视频 |