0
以下代码是检索3个图像并显示在表格中!我已经导入了必要的jQuery库和css脚本来实现灯箱模态!灯箱模式在网页中的图像
<?php
require("includes/db.php");
$sql="SELECT * FROM `order` ";
$result=mysqli_query($db,$sql);
echo"<head>";
echo"<link rel='stylesheet' href='lightbox.css'>";
echo"<script type='text/javascript' src='lightbox.min.js'>";
echo"</script>";
echo"</head>";
echo "<body bgcolor=#E6E6FA>";
echo "<table border=1 cellspacing=0 cellpadding=4 > " ;
while($row=mysqli_fetch_array($result))
{
echo '<a href='.($row['Image1']).' data-lightbox="gallery" >';
echo "<img src='" .$row['Image1']. "' height='200' width='200'/>";
echo "</a>";
echo "<br>";
echo"</td>";
echo"<td align=center >";
if($row['Image2']=="No copy"){
echo "No copy";
}
else{
echo '<a href='.($row['Image2']).' data-lightbox="gallery" >';
echo "<img src='" . $row['Image2'] . "' height='200' width='200'/>";
}
echo "</a>";
echo "<br>";
echo"</td>";
echo"<td align=center >";
if($row['Image3']=="No copy"){
echo "No copy";
}
else{
echo '<a href='.($row['Image3']).' data-lightbox="gallery" >';
echo "<img src='" . $row['Image3'] . "' height='200' width='200'/>";
}
echo "</a>";
echo "<br>";
echo"</tr>";
}
echo "</table>";
?>
上面的代码不起作用请帮帮我!我如何需要更正代码?我在开发人员工具中遇到以下错误!
lightbox.min.js:12 Uncaught TypeError: a is not a function
http://localhost/project1/test/images/close.png Failed to load resource: the server responded with a status of 404 (Not Found)
http://localhost/project1/test/images/prev.png Failed to load resource: the server responded with a status of 404 (Not Found)
http://localhost/project1/test/images/next.png Failed to load resource: the server responded with a status of 404 (Not Found)
http://localhost/project1/test/images/loading.gif Failed to load resource: the server responded with a status of 404 (Not Found)
使用lightbox.js,以便它将提供有关错误的完整详细信息,缩小文件不会给出完整的错误消息。 –
纠正了错误,但灯箱模型方法没有实现 –
你可以创建一个JS小提琴,然后我会纠正它,或者你可以从控制台提供一些错误信息? –