0
当鼠标悬停时,我需要从数据库中使用表格(如下图所示)获取并显示数据,并在鼠标悬停时消失。如何在鼠标悬停时显示来自表格的其他数据
这里是模式
public function teacher_with_subject(){
$this->db->select('*')
->from('teacher AS t')
->join('teacher_subject ts','t.computer_number=ts.computer_number', 'left')
->where('t.date_of_termination','0000-00-00')
->where('ts.date_of_end','0000-00-00');
$query = $this->db->get(); return $query->result_array();
}
控制器
$located=$this->select_model->teacher_with_subject();
视图: -
if (count($located) > 0) {
echo '<table>';
foreach($located as $locate){
echo "<tr><td>".$locate['computer_number']."</td><td>".$locate['name']."</td><"</td><td><img src=". base_url()."inc/images/confirm.png width='45' height='30' border='0' class='computer_number' data-id='".$locate['computer_number']."'/></td></tr>";
}
echo '</table>';
}
我想当鼠标悬停名
为什么Java标记? – yashpandey
对不起,它是JavaScript而不是Java –