จะเขียน script ยังไงให้สามารถดึงรูปภาพมาจากฐานข้อมูลได้ และให้เรียงกัน 3 ภาพ ช่วยแนะนำด้วยนะคะ
ถาม-ตอบ แนะนำไอเดียว โค้ดตัวอย่าง แนวทาง วิธีแก้ปัญหา จะเขียน script ยังไงให้สามารถดึงรูปภาพมาจากฐานข้อมูลได้ และให้เรียงกัน 3 ภาพ ช่วยแนะนำด้วยนะคะ
จะเขียน script ยังไงให้สามารถดึงรูปภาพมาจากฐานข้อมูลได้ และให้เรียงกัน 3 ภาพ ช่วยแนะนำด้วยนะคะ
Copy
นี่โค้ดที่เราเขียนแต่ยังไม่ได้เขียน script เข้าไป
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>นักเรียน</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css" integrity="sha384-GJzZqFGwb1QTTN6wy59ffF1BuGJpLSa9DkKMp0DgiMDm4iYMj70gZWKYbI706tWS" crossorigin="anonymous">
<link rel="stylesheet" href="styleindex.css" />
<style>
h2 {
line-height: 1.66;
margin: 0;
padding: 0;
font-weight: bold;
color: #222;
font-family: th sarabun new;
font-size: 26px; }
.block-1 {
width: 120px;
height: 250px;
margin: 20px;
background: #204E5F;
float: left;
}
.block-2 {
width: 120px;
height: 250px;
margin: 20px;
background: #79A7A8;
float: left;
}
.block-3 {
width: 120px;
height: 250px;
margin: 20px;
background: #B7D7D8;
float: left;
}
</style>
</head>
<body>
<script src="js/jquery-1.11.0.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<!-- menu bootstrap header-->
<nav class="navbar navbar-expand-lg navbar-light " style="background-color: #FF8984;">
<a class="navbar-brand">
<img src="http://angsila.cs.buu.ac.th/~58160704/project/picture/1.png" width="30" height="30" class="d-inline-block align-top" alt="">
Sign Language
</a>
</nav>
<nav class="navbar navbar-light ">
<h2> บทเรียน</h2>
<form class="form-inline ">
<input class="form-control mr-sm-2" type="search" placeholder="ค้นหา..." aria-label="Search">
<button class="btn btn-light" type="submit" style="background-color: #B7D7D8;">ค้นหา</button>
</form>
</nav>
<br>
<br>
<center>
<div class="container">
<div class="card block-1" style="width: 20rem;">
<img src="..." class="card-img-top" alt="Norway">
<div class="card-body">
<h5 class="card-title ">Card title</h5>
<p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p>
<a href="#" class="btn btn-primary">บทที่1</a>
</div>
</div>
<div class="card block-2" style="width: 20rem;">
<img src="..." class="card-img-top" alt="...">
<div class="card-body">
<h5 class="card-title">Card title</h5>
<p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p>
<a href="#" class="btn btn-primary">บทที่2</a>
</div>
</div>
<div class="card block-3" style="width: 20rem;">
<img src="..." class="card-img-top" alt="...">
<div class="card-body">
<h5 class="card-title">Card title</h5>
<p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p>
<a href="#" class="btn btn-primary">บทที่3</a>
</div>
</div>
</div>
</center>
</body>
</html>
คำแนะนำ และการใช้งาน
สมาชิก กรุณา ล็อกอินเข้าระบบ เพื่อตั้งคำถามใหม่ หรือ ตอบคำถาม สมาชิกใหม่ สมัครสมาชิกได้ที่ สมัครสมาชิก
- ถาม-ตอบ กรุณา ล็อกอินเข้าระบบ
เว็บไซต์ของเราให้บริการเนื้อหาบทความสำหรับนักพัฒนา โดยพึ่งพารายได้เล็กน้อยจากการแสดงโฆษณา
โปรดสนับสนุนเว็บไซต์ของเราด้วยการปิดการใช้งานตัวปิดกั้นโฆษณา (Disable Ads Blocker) ขอบคุณครับ