|
所在平台: Udemy |
课程主页: https://www.udemy.com/course/learn-javascript-fundamentals-in-an-hour/
课程评论:没有评论
课程名称:学习基本JavaScript基础 课程概述: JavaScript是一种可以在所有现代网络浏览器中运行的编程语言。它与网页的HTML代码一同下载。与仅用于显示内容的HTML不同,JavaScript使网页设计师能够为网站添加功能性和交互性。 学习内容: 本课程将从学习JavaScript的编写位置开始。我们将学习在HTML标签内、标签内以及HTML文档外的文件中编写JavaScript,并讨论每种方法使用的原因。 接下来,我们将学习如何操作一些基本数据类型,包括简单的算术运算和JavaScript的内置数学功能。此外,我们还会学习如何使用“字符串”数据类型处理单词和字符,以及表示真值和假值的布尔类型。 随后,我们将介绍更复杂的类型,如数组,它基本上是一个列表。我们将学习如何创建数组、访问数组中的元素和修改数组内容。函数的概念也会被涵盖,以便我们能够将代码组织成简单的可重用部分。同时,我们还会学习对象,它是一种将数据和行为组合在一起的方式。 其次,我们将学习控制流,包括“if”语句,该语句允许脚本根据某些条件决定是否执行代码块。我们还将讨论循环,它是指重复执行代码块直到某个条件被满足。我们将学习如何处理错误,以确保它们不会中断脚本的执行。 接下来,我们将探讨文档对象模型(DOM),它允许JavaScript与网页的HTML代码进行交互。我们将学习几种查找特定HTML元素的方法,如何提取元素信息(如标签名称、属性等)、添加和移除页面元素,以及事件处理,让JavaScript能够对鼠标点击、移动和键盘按压等事件做出反应。 最后,课程将通过实践练习结束,我们将构建一个简单的基于JavaScript的网页,应用大部分课程中涉及的概念,包括用户输入验证、结果显示及错误信息展示。 先决条件: - HTML:学员必须了解HTML标签和属性的使用,对HTML的基本知识有一定了解。 - Google Chrome(推荐):课程将使用Google Chrome浏览器来执行所有示例,Chrome具有丰富的开发者工具,推荐用于使用JavaScript控制台运行示例。 - Notepad++(推荐):Notepad++是一个免费开源文本编辑器,尽管可以使用任何文本编辑器编写JavaScript和HTML,但Notepad++因其语法高亮和自动完成功能而受到推荐。
OverviewJavaScript is a programming language that can be run by all modern web browsers. It is downloaded alongside the HTML code of a webpage. Unlike HTML, which can only be used to display content, JavaScript allows web designers to add functionality and interactivity to their websites.What you will learn We will begin the course by learning where to write JavaScript. We will look at writing JavaScript directly inside an HTML tag, then inside of a tag, and then finally in a file separate from the HTML document. We will discuss some of the reasons for using each method.After that, we will learn about how to manipulate some basic data types. We will learn about how to do simple arithmetic, and also look at some of JavaScript's built-in mathematical capabilities. Then, we will learn about working with words and characters, using a data type known as the "string". We will also cover the Boolean type, which is a representation of True and False inside of a programming language.Then we will move on to more complex types. We will learn about the array, which is essentially a list. We will look at how to create arrays, how to access elements inside them, and how to modify the contents of an array. Functions will also be covered, which will allow us to organize code into simple, reusable pieces. We will also learn about objects, which are a way of grouping together data and behaviors.We will then move on to control flow. We will look at the "if" statement, which allows the script to decide whether or not to execute a block of code based on some condition. We will also look at looping. Looping refers to repeatedly executing a block of code until some condition is met. Then, we will learn about errors, and how to handle them properly so that they do not halt execution of the script.Next, we will look at the Document Object Model ( DOM ). This is what allows JavaScript to interact with the HTML code of a webpage. We will look at several ways of finding any particular HTML element on the page. Then we will see what information we can extract from that element (tag name, attributes,etc.). We will learn about adding and removing elements from a page. Finally, we will learn about events, which allows JavaScript to react to things like mouse clicks, mouse movement, key presses, and many others.We will end the course with a practical exercise, in which we will build a simple JavaScript-based webpage. We will put to use most of the concepts covered in the course. We will look at how to validate user input, how to display results, and how to display meaningful error message to the user.Prerequisites HTML: The student must know how to use HTML tags and attributes. Only a very basic understanding of HTML is assumed.Google Chrome (Recommended): Google Chrome is a free web browser and it will beused to execute all the examples in this course. Although all browsers can run JavaScript, Chrome has extensive built-in developer tools. In the course, we will be using Chrome's JavaScript console, which will allow us to run quick little examples without the need to create and edit files.Notepad++ (Recommended): Notepad++ is a free, open-source text editor. Although JavaScript and HTML can be written using any text editor, Notepad++ is highly recommended because of features such as syntax highlighting and auto-complete.