Skip to main content

JavaScript - Ngày 7

Untitled Document
Đăng ký du lịch
Họ và Tên

Địa chỉ

Điện thoại
Khách Việt Nam
Chọn tour
Phương tiên


Số lượng đoàn khách
Ghi chú thêm

Thông báo sẽ hiển thị ở đây!

//Code
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
</head>

<body>
<script type="text/javascript">
function kiemtra()
{
if(document.getElementById("hoten").value=="")
document.getElementById("thongbao").innerHTML="Họ tên không được để trống!";
else if(document.getElementById("diachi").value=="")
document.getElementById("thongbao").innerHTML="Địa chỉ không được để trống!";
else
document.getElementById("thongbao").innerHTML="Bạn đã đăng ký thành công!!!";
}
</script>
<form id="form1" name="form1" method="post">
  <table width="800" border="1" cellspacing="0" cellpadding="0" align="center">
    <caption>
      Đăng ký du lịch
    </caption>
    <tbody>
      <tr>
        <td width="121">Họ và Tên</td>
        <td width="373">
        <input name="hoten" type="text" id="hoten" size="60"></td>
      </tr>
      <tr>
        <td><p>Địa chỉ</p></td>
        <td>
        <input name="diachi" type="text" id="diachi" size="45"></td>
      </tr>
      <tr>
        <td>Điện thoại</td>
        <td>
        <input name="dienthoai" type="text" id="dienthoai" size="20"></td>
      </tr>
      <tr>
        <td>Khách Việt Nam</td>
        <td><input name="checkbox" type="checkbox" id="checkbox" checked></td>
      </tr>
      <tr>
        <td>Chọn tour</td>
        <td>
          <select name="chontour" id="chontour">
  <option value="1">Buôn mê thuột - Gia Lai - Kontum</option>
      <option value="2">Sài gòn - Đà Lạt</option>
        </select></td>
      </tr>
      <tr>
        <td>Phương tiên</td>
        <td><p>
          <label>
            <input type="radio" name="phuongtien" value="1" id="phuongtien_0">
            Máy bay</label>
          
          <label>
            <input name="phuongtien" type="radio" id="phuongtien_1" value="2" checked>
            Xe ô tô</label>
          <br>
        </p></td>
      </tr>
      <tr>
        <td colspan="2" align="center"><fieldset style="width: 70%;">
          <legend>Số lượng đoàn khách</legend>
          <label for="nguoilon">Người lớn:</label>
          <input name="nguoilon" type="text" id="nguoilon" size="10"> 
          <label for="treem">Trẻ em::</label>
          <input name="treem" type="text" id="treem" size="5">
        </fieldset></td>
      </tr>
      <tr>
        <td>Ghi chú thêm</td>
        <td>
        <textarea name="ghichu" rows="2" id="ghichu"></textarea></td>
      </tr>
      <tr>
        <td colspan="2" align="center"><input type="button" name="dongy" id="dongy" value="Đồng ý" onClick="kiemtra();"></td>
      </tr>
      <tr>
  <td colspan="2"><p id="thongbao" align="center">Thông báo sẽ hiển thị ở đây!</p></td>
      </tr>
    </tbody>
  </table>
</form>
</body>
</html>

Comments

Post a Comment

Popular posts from this blog

PHP#33MySQL#29 - Đếm lượt truy cập (KẾT THÚC KHÓA HỌC)

//hitcounter.php <?php session_start();  ?> <!doctype html> <html> <head> <meta charset="utf-8"> <title>Untitled Document</title> </head> <body> <?php  include("../connect.php"); //cập nhật số luowhtj truy cập: $sl="update counter set cnt=cnt+1"; mysqli_query($link,$sl); //Lấy dữ liệu số lượt truy cập để hiển thị ra web: $sl2="select * from counter"; $kq=mysqli_query($link,$sl2); $d=mysqli_fetch_array($kq); //Định dạng: $chuoi=str_pad($d['cnt'],6,"0",STR_PAD_LEFT); $luottrycap=""; for($i=0;$i<strlen($chuoi);$i++) { $tam=substr($chuoi,$i,1); $luottrycap.="<img src='images/$tam.png'/>"; } /*-Khi user truy cập vào website: +lần đầu tuy cập: Lưu thông tin của user lên csdl +Sau lần đầu tiên: cập nhtaaj lastvisit - Xóa các dòng dữ liệu quá 1 phút (Quy ước thời gian để khẳng định online hay offline: 1 phút) - Thống kê số liệu người dùng o...

2 (giao diện Visual C#) Solution Explorer

Bài 2 - SOME OTHER TIME - Vào dịp khác