Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Sardor kursovoy новый.docx
Скачиваний:
0
Добавлен:
01.07.2025
Размер:
194.94 Кб
Скачать

SOUTH KAZAKHSTAN STATE PEDAGOGICAL UNIVERSITY

FACULTY OF NATURAL SCIENCES

Department of Phyics and Mathematics

Course works

Theme:«Registering Events in JavaScript»

Prepeared by: Tukhtamuratov S.S

Group: Computer science 111-14 «а»

Checked by: Shomanbayeva M.T

Shymkent – 2017

CONTENT

INTRODUCTION................................................................................................................3 1 Registering Events in JavaScript ……………………….……….…………………4

1.1 Registering Event Hardlers……………………………………………………………..4

1.2 Types of mouse events in JavaScript..……..……………............................................10

1.3 Types of keyboard events in JavaScript…………. ……………………...….……......14

2 REPORTS USING EVENTS IN JAVASCRIPT.............................................................28

2.1 Specify a reference to the result of the report, which appeared in arrays of javascript28

CONCLUSION....................................................................................................................30

BIBLIOGRAPHY………...……………………….…........................................................31

Introduction

Today's world of websites is difficult to imagine without JavaScript language. JavaScript is what makes web pages live, which we look at every day in our web browser.

JavaScript was created in 1995 in Netscape as the scripting language in the browser Netscape Navigator 2. Originally the language was called LiveScript, but on the wave of popularity at that time another language, Java LiveScript was renamed to JavaScript. However, this point still sometimes leads to some confusion: some novice developers believe that Java and JavaScript are almost the same language. No, these are absolutely two different languages, and they are related only by name.

An event is an action that can be performed by either the user or other objects on the page. The most striking example of an event is the click of a user on an object (click), whether it's a button, a link, or any other element. Another example of an event is the mouse over an object (mouseover), say above the image. Also the event is the full load of the page (load). In general, all actions that occur on the site are events. So, we can capture any event that is produced on the page and process it with the appropriate handler. For example, if you hover over a div block, we can output a message, say 'you are in the text area'. Or, when clicking on a button, hide some block from the page. In general, a lot of things can be done preprocessing an event. And in order to handle some event, you need to use a special handler for this event. Each event has its own handler, for example, a click event has an onclick handler. A mouseover event over the object (mouseover) has an onmouseover handler. And the event of the full load of the page (load) has an onload handler. That is, as you understand the name of the handler, it is formed from the prefix 'on' + the name of the event. A complete list of events and handlers can be found in the directory, in this article we will only consider those that are most often used. The event handler is called as an attribute, in the HTML element itself. In the value of the handler, you can write JavaScript code at once, but it's better to call some function that does the necessary actions. The function needs to be described inside the script tag, which can be found both inside the head block and at the end of the body tag. As a parameter for this function, the word this, that is, the current object, is passed. Now let's write a simple example. If you hover over a block with text, we will use the alert method to display the message that the user is inside the text area.

Course works purpose: The purpose of the course: the use of objects and arrays Javascript. Reports using objects and arrays. Explanation of the effect and reporting on the results.

Relevance of the topic: Working with objects and arrays Javascript is one of the current problems at the moment. However, for students this problem is solved using objects and arrays Javascript. I think that, using this theme, we will formulate our relevance.

Course works structure: introduction, two chapters, conclusion, list of literature used. Javascript The first part of working with Javascript, working with structures. The second part includes reviews of Javascript objects and arrays, as well as explanations, achievements and uses in the region.

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]