四虎精品视频-四虎精品成人免费网站-四虎黄色网-四虎国产视频-国产免费91-国产蜜臀97一区二区三区

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

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

主站蜘蛛池模板: 韩国电影闵度允主演电影| 韩绛| p333的图片| 唐瑜苏沐月是哪部短剧| 汤梦佳| 阳巧玥| 孙泽源个人简介| 1024电影| 蒙古小男孩唱哭全场| 白璐个人简介照片| xiuren秀人网免费| 玫瑰的故事万茜演的什么角色| 誓不忘情 电影| 深夜少妇| 美人鱼公主| 徐贤电视剧| 好好说话电视剧免费观看完整版40集 | 郭碧婷是哪里人| 军犬麦克斯| 三寸天堂简谱| 爆操处女| 夜之女王 电影| 大秦帝国第一部免费看| 芝加哥警署第九季| 二十以内加减法口诀表| 激情戏车震| 誓不忘情 电影| 久草电影| 香港之夜在线观看完整版| 我会读心术免费观看完整版| 免费成人视屏| 上海爱情故事| 觉醒年代免费看| 黄视频免费在线看| 第一财经在线直播今日股市| 热爱 电影| 运气旺的微信头像图片| 红电视剧演员表| 电影《遗产》韩国丧尸| 安装暖气片电话| 左佳|