Hot News
Loading...

Các ví dụ về biểu Form của HTML



Như đã trình bày cho các bạn về biểu mẫu Form của HTML
tại entry: HTML <4> - Biểu mẫu Form

Trong Entry này tôi xin giới thiệu một số ví dụ liên quan.




Ví dụ về Hộp Thoại:

Công thức:


<form action="">
First name:
<input type="text" name="firstname">
<br>
Last name:
<input type="text" name="lastname">
</form>


Kết quả:

First name:


Last name:


Ví dụ về nút chọn:

<form action="">
Male:
<input type="radio" checked="checked"
name="Sex" value="male">
<br>
Female:
<input type="radio"
name="Sex" value="female">
</form>
<p>
When a user clicks on a radio-button, the button becomes checked, and all other buttons with the same name become unchecked
</p>

Kết quả:

Male:

Female:

When a user clicks on a radio-button, the button becomes checked, and all other buttons with the same name become unchecked


Ví dụ về hộp chọn:

<form action="">
I have a bike:
<input type="checkbox" name="vehicle" value="Bike">
<br />
I have a car:
<input type="checkbox" name="vehicle" value="Car">
<br />
I have an airplane:
<input type="checkbox" name="vehicle" value="Airplane">
</form>

Kết quả:

I have a bike:
I have a car:
I have an airplane:



Share on Google Plus

About Chinhnd

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.
    Blogger Comment
    Facebook Comment

0 nhận xét :

Post a Comment


♦ Mời bạn gửi Nhận xét của mình. Bạn có thể nhận xét bằng cách chọnComment asTên/URL hay Ẩn danh. Tuy nhiên bạn nên chọn Tên/URL với URL có thể để trống. Bạn vui lòng gõ tiếng Việt có dấu.

♦ Bấm vào Đăng ký qua email [Subscribe by email] để đăng ký theo dõi nhận xét của bài này.

♦ Các bạn tự chịu trách nhiệm với Nhận xét của mình. Nhận xét của bạn cho biết Bạn là ai? Là người như thế nào?.