Download presentation
Presentation is loading. Please wait.
1
Learning & Development Team http://academy.telerik.com Telerik Software Academy
2
HTML Forms Form Fields and Fieldsets Text Boxes Buttons Checkboxes and Radio Buttons Select Fields Hidden Fields Sliders and Spinboxes Validation Fields 2
3
HTML Frames Frame and noframe tags iframe tag 3
4
Entering User Data from a Web Page
5
The primary method for gathering data from site visitors HTML Forms can contain Text fields for the user to type Buttons for interactions like "Register", "Login", "Search" Menus, Sliders, etc… Check Google, Yahoo, Facebook Google search field is a simple Text field 5
6
Create a form block with Example: 6 <form></form>......</form> The "action" attribute tells where the form data should be sent The "method" attribute tells how the form data should be sent – via GET or POST request
7
Single-line text input fields: Multi-line text input fields (textarea): Password input – a text field which masks the entered text with * signs 7 This is a multi-line text field This is a multi-line text field
8
Reset button – brings the form to its initial state Submit button: Image button – acts like submit but image is displayed and click coordinates are sent Ordinary button – no default action, used with JS 8 <input type="reset" name="resetBtn" value="Reset the form" /> value="Reset the form" /> <input type="image" src="submit.gif" name="submitBtn" alt="Submit" /> name="submitBtn" alt="Submit" />
9
Checkboxes: Radio buttons: Radio buttons can be grouped, allowing only one to be selected from a group: 9
10
Dropdown menus: Multiple-choice menus 10 <option value="Value 1" <option value="Value 1" selected="selected">Male selected="selected">Male Female Female Other Other </select> <option value="Value 1" <option value="Value 1" selected="selected">keyboard selected="selected">keyboard mouse mouse </select>
11
Hidden fields contain invisible data Not shown to the user Used by JavaScript and server-side code ViewState, SessionState in ASP.NET 11 <input type="hidden" name="Account" value="This is a hidden text field" /> value="This is a hidden text field" />
12
Labels are used to associate an explanatory text to a form field using the field's ID Clicking on a label focuses its associated field Checkboxes are toggled Radio buttons are checked Labels are Both a usability and accessibility feature Required in to pass accessibility validation 12 First Name First Name
13
Fieldsets are used to enclose a group of related form fields: The is the fieldset's title 13 Client Details Client Details Order Details Order Details </form>
14
Live Demo 14
15
Lets Make It Spin
16
Restricts users to enter only numbers Additional attributes min, max and step and value Can become Spinbox or Slider, depending on the input type Have some differences on different browsers Spinboxes do not work on Firefox Shown as regular textboxes 16
17
Live Demo
18
Autocomplete The browser stores the previously typed values Brings them back on a later visit Autofocus The field becomes on focus on page load Required The field is required to be filled/selected 18 <input type="text" name="firstName" autofocus="autofocus" /> autofocus="autofocus" />
19
Email – provides a simple validation for email Can be passed a pattern for validation In a mobile device brings the email keyboard URL – has validation for url In a mobile device brings the url keyboard Telephone Brings the numeric keyboard 19
20
Live Demo 20
21
The tabindex HTML attribute controls the order in which form fields and hyperlinks are focused when repeatedly pressing the TAB key tabindex="0" (zero) – "natural" order If X < Y, then elements with tabindex="X" are iterated before elements with tabindex="Y" Elements with negative tabindex are skipped, however, this is not defined in the standard 21
22
Live Demo
23
, and, and
24
Frames provide a way to show multiple HTML documents in a single Web page The page can be split into separate views (frames) horizontally and vertically Frames were popular in the early ages of HTML development, but now their usage is rejected Frames are not supported by all user agents (browsers, search engines, etc.) A element is used to provide content for non-compatible agents. 24
25
25 <html> Frames Example Frames Example </html> frames.html Note the target attribute applied to the elements in the left frame.
26
Inline frames provide a way to show one website inside another website: 26 iframe-demo.html
27
форум програмиране, форум уеб дизайн курсове и уроци по програмиране, уеб дизайн – безплатно програмиране за деца – безплатни курсове и уроци безплатен SEO курс - оптимизация за търсачки уроци по уеб дизайн, HTML, CSS, JavaScript, Photoshop уроци по програмиране и уеб дизайн за ученици ASP.NET MVC курс – HTML, SQL, C#,.NET, ASP.NET MVC безплатен курс "Разработка на софтуер в cloud среда" BG Coder - онлайн състезателна система - online judge курсове и уроци по програмиране, книги – безплатно от Наков безплатен курс "Качествен програмен код" алго академия – състезателно програмиране, състезания ASP.NET курс - уеб програмиране, бази данни, C#,.NET, ASP.NET курсове и уроци по програмиране – Телерик академия курс мобилни приложения с iPhone, Android, WP7, PhoneGap free C# book, безплатна книга C#, книга Java, книга C# Николай Костов - блог за програмиране http://academy.telerik.com
28
1. Create a Web form that looks like this sample: 28
29
2. Create the following using tables and forms: 29
30
3. Create the following HTML Page Hint: Use Fieldsets and Nested tables 30
31
4. *Construct the following Grid component: Try to make a HTML page, that looks just like the example CSS is required 31
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.