Skip to main content

Thực hành JQUERY AJAX - layout a.html #2

Untitled Document //code
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style>
body { text-align:left}
</style>
<link href="c1.css" rel="stylesheet" type="text/css" />

<script type="text/javascript" src="https://code.jquery.com/jquery-3.6.0.js"></script>
</head>

<body>
<div id="container">
<div id="header"></div>
    <div id="left">
    <a href="layout_a.html">Trang chủ</a> 
        <a href="tinxahoi.html">Tin xã hội</a> 
        <a href="tingiaoduc.html">Giáo dục</a> 
        <a href="tinthethao.html">Thể thao</a> 
        <a href="thohay.html">Thơ hay</a> 
        <a href="vitinh.html">Vi tính</a>         
    </div>
    <div id="right"></div>
</div>
<script type="text/javascript">
  $(document).ready(function(){
  $("#left a").click(function(){
        var url=$(this).attr('href');
          $("#right").load(url);
          return false;
        });
  });
</script>
</body>
</html>

Comments

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