我有这样的代码,我想实现下面的Java脚本到这个PHP代码,我需要EXCUTE的JavaScript即使这个PHP从名为index.php的 任何帮助,请如何实现的JavaScript到PHP文件
<script type = "text/javascript">
$('.estudent_id').click(function(){
$student_id = $(this).attr('name');
$('#edit_query').load('load_edit1.php?student_id=' + $student_id);
});
});
</script>
Check_data.php
<table id = "table" class = "table table-bordered">
<?php
$dtpickerdate = isset($_POST['dtpickerdate']) ? $_POST['dtpickerdate'] : NULL;
$q_customer = $conn->query
("SELECT * from orders inner JOIN customer_order on customer_order.order_no =orders.order_no and orders.date like'$dtpickerdate' inner join driver_order on driver_order.order_no=orders.order_no LEFT JOIN customer on customer.phone=customer_order.phone order by k_time,time desc")
or die(mysqli_error());
$k_time = '';
while($f_customer = $q_customer->fetch_array()){
$s=mysqli_num_rows($q_customer);
?>
<tr>
<?php
if($k_time == '' || $k_time != $f_customer['k_time']){
$k_time = $f_customer['k_time'];
echo '<td align="center" > <span style=" font-weight:bold;">'
.$f_customer['k_time']. '</td>';
} else{
echo "<td td style=' border: none;'> </td>";
}
echo "<td style='background-color: #5f5d5d; ' align='center' span style='font-weight:bold;'> <a href = '#' style='color:#ececec;font-weight:bold;' data-toggle = 'modal' data-target = '#action'>".$f_customer['order_no']."</a></td>";
echo "<td style='background-color: #5f5d5d;color:#ececec;'>" .$f_customer['first_name']."</td>";
echo "<td style='background-color: #5f5d5d;color:#ececec;'>".
}
您的问题的地址不明确。请重新说明它并提及你的目标是什么。 –
你的意思是这个页面'check_data.php'将包含在你的'index.php'文件中?对 ? –
@Usman Rana我有index.php哪些只有datepicker和这个datepicker调用另一个页面(check_data.php)现在在check_data我需要执行一些JavaScript代码,但我不知道他们为什么没有工作,他们只能在index.php –