Формы в HTML. Элемент FORM Элемент уровня «блок» Управляющие элементы Просто текст Атрибуты: action – url обработчика method – post или get enctype –

Slides:



Advertisements
Similar presentations
>> Introduction to HTML: Forms. Introduction to HTML 5 Important HTML Tags HTML tags and attributes Images Hyperlinks Lists –{ordered | unordered | definition}
Advertisements

JavaScript Forms Form Validation Cookies. What JavaScript can do  Control document appearance and content  Control the browser  Interact with user.
Technologies for web publishing Ing. Václav Freylich Lecture 4.
Supplement Creating Forms. Objectives Show how forms are used How to create the Form element HTML elements used for creating input fields.
Creating Web Page Forms. Objectives Describe how Web forms can interact with a server-based program Insert a form into a Web page Create and format a.
USER INTERACTIONS: FORMS
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 9 Key Concepts 1 Copyright © Terry Felke-Morris.
ECA 228 Internet/Intranet Design I Forms. ECA 228 Internet/Intranet Design I Forms forms are a way for a user to communicate with you – text fields –
Web Development & Design Foundations with XHTML Chapter 9 Key Concepts.
Chapter 10 Form Basics Key Concepts Copyright © 2013 Terry Ann Morris, Ed.D 1.
1 Web Developer & Design Foundations with XHTML Chapter 6 Key Concepts.
CNIT 133 Interactive Web Pags – JavaScript and AJAX JavaScript forms.
Forms and Form Controls Chapter What is a Form?
HTML - Forms By Joaquin Vila, Ph.D.. Form Tag The FORM tag specifies a fill-out form within an HTML document. More than one fill-out form can be in a.
Copyright ©2005  Department of Computer & Information Science Introducing DHTML & DOM: JavaScript & Forms.
Tables and Forms HTML5 Tables and Forms. Table Overview table element ( ) Attributes: align (left, right, center), bgcolor, border, cellpadding, cellspacing,
CSC 2720 Building Web Applications HTML Forms. Introduction  HTML forms are used to collect user input.  The collected input is typically sent to a.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 9 Key Concepts 1 Copyright © Terry Felke-Morris.
CpSc 462/662: Database Management Systems (DBMS) (TEXNH Approach) HTML Forms James Wang.
HTML Forms.
LOGO FORMs in HTML CHAPTER 5 Eastern Mediterranean University School of Computing and Technology Department of Information Technology ITEC229 Client-Side.
Web Development & Design Foundations with XHTML Chapter 9 Key Concepts.
HTML - Forms By Joaquin Vila, Ph.D.. Form Tag The FORM tag specifies a fill-out form within an HTML document. More than one fill-out form can be in a.
Week 9 - Form Basics Key Concepts 1. 1.Describe common uses of forms on web pages 2.Create forms on web pages using the form, input, textarea, and select.
Creating Web Page Forms. Introducing Web Forms Web forms collect information from users Web forms include different control elements including: –Input.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 9 Key Concepts 1 Copyright © Terry Felke-Morris.
Web Development & Design Foundations with XHTML Chapter 9 Key Concepts.
1 Review of Form Elements. 2 The tag Used in between tags.  Form elements(text control, buttons, etc.. ) goes here. OR  Form elements(text control,
HTML Forms a form is a container for input elements on a web page input elements contain data that is sent to the web server for processing.
Introduction To HTML Form Inputs Written By George Gimian.
Chapter 19 Creating and Processing HTML Forms. How HTML Forms Transmit Data name1=value1&name2=value2...&nameN =valueN GET or POST GET, an HTTP GET request,
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 9 Key Concepts 1 Copyright © Terry Felke-Morris.
Form Components and Elements
+ FORMS HTML forms are used to pass data to a server. begins and ends a form Forms are made up of input elements Every input element has a name and value.
HTML Form Inputs. Creating a basic form …content goes here…
HTML FORMS Basharat Mahmood, Department of Computer Science,CIIT,Islamabad,Pakistan. 1.
20-753: Fundamentals of Web Programming 1 Lecture 6: Advanced HTML Fundamentals of Web Programming Lecture 6: Advanced HTML.
USABLEANDACCESSIBLEFORMS. accessibility or Accessibility?
JavaScript Event Handlers. Introduction An event handler executes a segment of a code based on certain events occurring within the application, such as.
CIS 228 The Internet 12/6/11 Forms and Validation.
FORMS Explained By: Jasdeep Kaur. Lecturer, Department of Computer Application, PGG.C.G., Sector: 42, Chandigarh.
Chapter 14 The HTML Tag
Methods and Object Information. Some Document Methods.
Chapter 4 Java Script – Part2. 2 Location object Properties Properties href – whole path will be displayed. ex: window.location.href ( see example 11)
Введение в технологии W3C
How to Write Web Forms By Mimi Opkins.
Introduction to HTML Forms and Servlets
CS3220 Web and Internet Programming HTML Tables and Forms
Forms Web Design Ms. Olifer.
HTML Forms Pat Morin COMP 2405.
FORMS IN HTML.
(and available form fields)
FORMS Explained By: Sarbjit Kaur.
Web Design and Development
ITE 115 Creating Web Page Forms
Server-Side Application and Data Management IT IS 3105 (Spring 2010)
Today - Forms! WD Students produce a basic HTML/XHTML document using forms. Find the group that best matches the part of the project you are going.
ARUSHA TECHNICAL COLLEGE WEB DESIGN(html forms)
Validation and Building Small Apps
النماذج عند الانتهاء من هذا الدرس ستكون قادرا على:
Designing Forms Lesson 10.
Creating Form Elements
Creating Form Elements
Web Development & Design Foundations with H T M L 5
FORM OBJECT When creating an interactive web site for the Internet it is necessary to capture user input and process this input. Based on the result of.
CNIT 131 HTML5 - Forms.
CS3220 Web and Internet Programming HTML Tables and Forms
Principles of Web Design 5th Edition
The Internet 10/27/11 XHTML Forms
JavaScript and Forms Kevin Harville.
Presentation transcript:

Формы в HTML

Элемент FORM Элемент уровня «блок» Управляющие элементы Просто текст Атрибуты: action – url обработчика method – post или get enctype – тип содержимого (для “post”) accept-charset target onSubmit

Управляющие элементы форм INPUT. Задаются атрибуты name, value Типы элемента INPUT (атрибут type): text, password – текстовое поле checkbox – флажок radio – «радио» кнопка submit, reset – кнопки для отсылки и «сброса» hidden – скрытое поле image – изображение button – кнопка без специального действия file – элементы для отправки файла

Дополнительные атрибуты элемента INPUT type=text, password size – ширина в символах maxlength – максимальный размер в символах type=radio, checkbox checked type=image src – url изображения type=reset, submit, button value – подпись

Примеры Флажки Получать уведомления по почте Скрывать адрес от посетителей Радиокнопки Ваш возраст: До 16 лет От 16 до 40 лет Больше 40 лет

Элементы для создания меню SELECT + OPTION name – атрибут элемента SELECT value – атрибут элемента OPTION Пример: Выберите напиток: Сок Пиво Молоко OPTGROUP с атрибутом label

Другие элементы форм TEXTAREA rows, cols, accesskey disabled, readonly BUTTON type (reset, submit, button) LABEL for – id элемента, для кот. метка accesskey FIELDSET – группа элементов LEGEND – заголовок для группы

Пример Возраст До 16 лет От 16 до 40 лет Больше 40 лет Почта Получать уведомления по почте Скрывать адрес от посетителей

События для форм FORM – onSubmit, onReset BUTTON – onFocus, onBlur, OnClick text, password – onChange, (onFocus, onBlur) SELECT – onChange, (onFocus, onBlur) Методы элементов формы: focus(), blur(), select()

Доступ к значениям формы Доступ клиента: Поля для всех элементов: name, value – соответствующие значения form – сама форма Поле только для SELECT: selectedIndex – номер выбранного пункта Для формы: все элементы являются подобъектами формы Доступ на сервере: при методе GET пары name, value попадают в часть адреса – запрос в виде name1=value1&name2=value2&…

Обработка событий Обработка клиентом: Вызов кода происходит ДО стандартной обработки Возврат значения false отменяет стандартную обработку (это позволяет, в частности, проверить данные перед отправкой на сервер) Обработка сервером: На сервере вызывается программа- обработчик запроса