|
|
|
สอบถามหน่อยครับปุ่ม dropdown เลื่อนไม่ลงช่วยดู code ให้หน่อยครับ |
|
|
|
|
|
|
|
พอดีเอาcode มาปรับๆเเล้ว ปุ่มdropdownข้างๆปุ่มhomeมันดันไม่เลือนลงมา
ช่วยดูให้หน่อยครับว่าเปิดปิดตรงไหนผิด ช่วยทีครับ
Code (PHP)
<html>
<head>
<style>
.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>
<div class="navbar">
<a class="navbar-brand" href="index.php">Home</a>
<div class="dropdown">
<button class="dropbtn">Report
<i class="fa fa-caret-down"></i>
</button>
<div class="dropdown-content">
<a href="Search.php">link1</a>
<a href="showtutor.php">link2</a>
<a href="#">link3</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>
</body>
</html>
<html>
<?php
$connect = mysqli_connect("localhost", "root", "", "new");
$query = "SELECT * FROM course ";
$result = mysqli_query($connect, $query);
?>
<html>
<head>
<title>ค้นหาตามวัน</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" />
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
</head>
<body>
<br /><br />
<div class="container" style="width:900px;">
<h2 align="center">ค้นหารายได้ตามวัน</h2>
<h3 align="center">เลือก วัน/เดือน/ปี</h3><br />
<div class="col-md-3">
<input type="text" name="from_date" id="from_date" class="form-control" placeholder="From Date" />
</div>
<div class="col-md-3">
<input type="text" name="to_date" id="to_date" class="form-control" placeholder="To Date" />
</div>
<div class="col-md-5">
<input type="button" name="filter" id="filter" value="Filter" class="btn btn-info" />
</div>
<div style="clear:both"></div>
<br />
<div id="order_table">
<table class="table table-bordered">
<tr>
<th width="5%">ID_buy</th>
<th width="30%">รหัสคอส</th>
<th width="43%">รหัสสมาชิก</th>
<th width="10%">ราคาคอส</th>
<th width="12%">วันเดือนปี</th>
</tr>
<?php
while($row = mysqli_fetch_array($result))
{
?>
<tr>
<td><?php echo $row["ID_buy"]; ?></td>
<td><?php echo $row["ID_co"]; ?></td>
<td><?php echo $row["ID_st"]; ?></td>
<td>$ <?php echo $row["price"]; ?></td>
<td><?php echo $row["Date"]; ?></td>
</tr>
<?php
}
?>
</table>
</div>
</div>
</body>
</html>
<script>
$(document).ready(function(){
$.datepicker.setDefaults({
dateFormat: 'dd-mm-yy'
});
$(function(){
$("#from_date").datepicker();
$("#to_date").datepicker();
});
$('#filter').click(function(){
var from_date = $('#from_date').val();
var to_date = $('#to_date').val();
if(from_date != '' && to_date != '')
{
$.ajax({
url:"filter.php",
method:"POST",
data:{from_date:from_date, to_date:to_date},
success:function(data)
{
$('#order_table').html(data);
}
});
}
else
{
alert("Please Select Date");
}
});
});
</script>
</html>
Tag : PHP, MySQL, HTML, CSS, jQuery, Windows
|
ประวัติการแก้ไข 2017-11-12 14:47:01
|
|
|
|
|
Date :
2017-11-12 14:45:19 |
By :
ArchRaid2123 |
View :
853 |
Reply :
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ขอภาพประกอบหน่อยครับ
|
|
|
|
|
Date :
2017-11-16 17:02:54 |
By :
mr.win |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
นี่ code หน้าเดียวเหรอ
ทำไม tag html มันดูงงๆ
|
|
|
|
|
Date :
2017-11-17 08:43:38 |
By :
ten1312 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 00
|