|
 |
|
รบกวนหน่อยครับใส่ bootstrap เเล้วเมนู dropdownไม่เลื่อนลง |
|
 |
|
|
 |
 |
|
คือผมใส่bootstrap เเล้วเมนูdropdownไม่ยอมเลื่อนลงมันต้องใส่ เมนูdropdownตรงไหนหรือครับช่วยดูให้ทีครับ ตามภาพเลยครับ
อันนี้คือBootstrap ที่ใส่ไปเเล้วทำให้dropdownไม่เลือนลงมันคือBootstrap เทเบิ้ล
Code (PHP)
<meta name="viewport" content="width=device-width, initial-scale=1,shrink-to-fit=no">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css" integrity="sha384-/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzALeQsN6M" crossorigin="anonymous">

Code (PHP)
<html>
<head>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<style>
table,th,td{
border: 1px solid black;
border-collapse: collapse;
}
</style>
<style type="text/css">
.navbar {
overflow: hidden;
background-color: #333;
font-family: Arial;
}
.navbar a {
float: left;
font-size: 16px;
color: white;
text-align: center;
padding: 14px 16px;
text-decoration: none;
}
.dropdown {
float: left;
overflow: hidden;
}
.dropdown .dropbtn {
font-size: 16px;
border: none;
outline: none;
color: white;
padding: 14px 16px;
background-color: inherit;
}
.navbar a:hover, .dropdown:hover .dropbtn {
background-color: red;
}
.dropdown-content {
display: none;
position: absolute;
background-color: #f9f9f9;
min-width: 160px;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
z-index: 1;
}
.dropdown-content a {
float: none;
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
text-align: left;
}
.dropdown-content a:hover {
background-color: #ddd;
}
.dropdown:hover .dropdown-content {
display: block;
}
</style>
</head>
<body>
<form name="frmMain" action="" method="post">
<div id="non-printable">
<div class="navbar">
<a class="navbar-brand" href="Home.php">Home</a>
<div class="dropdown">
<button class="dropbtn">Report
<i class="fa fa-caret-down"></i>
</button>
<div class="dropdown-content">
<a href="r1.php">ค้นหารายได้</a>
<a href="3.php">วิชาที่คนลงเรียนมากที่สุด</a>
<a href="4.php">ติวเตอร์ที่มีคนลงเรียนมากที่สุด</a>
<a href="11.php">ตรวจสอบรายชื่อคอร์สที่ควรจัดทำเป็นคอร์ส vdo</a>
<a href="8.php">คอร์สที่ควรทำเป็น VDO </a>
<a href="7.php">ตรวจสอบการเข้าเรียนเข้าสอน</a>
<a href="#">Link 4</a>
<a href="#">Link 5</a>
<a href="#">Link 6</a>
<a href="#">Link 7</a>
<a href="#">Link 8</a>
<a href="#">Link 9</a>
<a href="#">Link 10</a>
</div>
</div>
</div>
</div>
<?php
$con = mysqli_connect("localhost", "root", "", "tutor6");
$pro_search = $_POST['pro_search'];
$p = '%' . $pro_search . '%';
$q = "SELECT register.`ID_pay`,register.`ID_co`,payment.Price_pay,payment.Date_pay FROM register, payment,course where register.ID_pay=payment.ID_pay AND register.ID_co=course.ID_co AND Date_pay LIKE '$p'";
$result = mysqli_query($con, $q);
?>
<html>
<head>
<meta charset="UTF-8">
<div id="non-printable"><title>การค้นหา</title></div>
</head>
<body>
<div id="printable"><center><h2>ค้นหารายได้ตามระยะเวลา</h2></center>
<meta name="viewport" content="width=device-width, initial-scale=1,shrink-to-fit=no">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css" integrity="sha384-/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzALeQsN6M" crossorigin="anonymous">
<div id="non-printable"><form action="r1.php" method="post">
<center><label>กรุณาใส่ ปี-เดือน-วัน</label> <input type="text" size="20px"
name="pro_search"/><input name="submit" type="submit" id="submit" value="ค้นหาข้อมูล" ></center>
</form></div>
<br>
<center><table class="table table-responsive table-hover" style="width: 1000px;">
<thead class ="thead-inverse">
<tr>
<th>รหัสจ่าย</th>
<th>รหัสคอร์ส</th>
<th>ราคาจ่าย</th>
<th>วันที่จ่าย</th>
</tr>
</thead>
<?php
while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
?>
<tr>
<td><center><?php echo $row ['ID_pay']; ?></td></center>
<td><center><?php echo $row ['ID_co']; ?></td></center>
<td><center><?php echo $row ['Price_pay']; ?> บาท</td></center>
<td><center><?php echo $row ['Date_pay']; ?></td></center>
</tr>
<?php
}
?>
</table>
</div>
<div id="non-printable"><center><input onclick="javascript:window.print()" type="button" value="คลิ๊กเพื่อ Print หน้านี้" name="print2"></div>
</body>
</html>
Tag : PHP, HTML, Ajax, PDF, iReport, Bootstrap Framework

|
ประวัติการแก้ไข 2017-11-15 12:55:31
|
 |
 |
 |
 |
Date :
2017-11-15 12:51:27 |
By :
ArchRaid2123 |
View :
4106 |
Reply :
3 |
|
 |
 |
 |
 |
|
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ไม่รู้จะอธิบายยังไง ลองเอาโค้ดนี้รันดูครับ
Code (PHP)
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
<div class="navbar">
<div class="dropdown">
<button class="btn btn-default dropdown-toggle" type="button" id="menu1" data-toggle="dropdown">Tutorials
<span class="caret"></span></button>
<ul class="dropdown-menu">
<li><a href="#">Link 4</a></li>
<li><a href="#">Link 5</a></li>
<li><a href="#">Link 6</a></li>
<li><a href="#">Link 7</a></li>
<li><a href="#">Link 8</a></li>
<li><a href="#">Link 9</a></li>
<li><a href="#">Link 10</a></li>
</ul>
</div>
</div>
</body>
</html>
|
ประวัติการแก้ไข 2017-11-15 16:03:42
 |
 |
 |
 |
Date :
2017-11-15 16:02:30 |
By :
sinomoney |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ไม่ได้ include jQuery & bootstrap.js
|
 |
 |
 |
 |
Date :
2017-11-16 15:02:11 |
By :
Krungsri |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 05
|