作者:咪了眼的小迷糊 | 来源:互联网 | 2022-01-25 19:50
【Html代码】
<&#63; if ($categorys): &#63;>
<&#63; foreach ($categorys as $category):&#63;>
-
<&#63; echo $category->name&#63;>
<&#63; endforeach;&#63;>
<&#63; else: &#63;>
暂时没有设置
<&#63; endif; &#63;>
【js代码】
【php代码】
public function listorder() {
$data = explode(',', $this->input->post('data'));
$i = 1;
foreach ($data as $id) {
if (!$id)
continue;
$this->category_model->save($id, array(
'listorder' => $i,
));
$i++;
}
}
public function delete() {
$id = $this->input->get('id');
$this->category_model->delete($id);
messagebox(lang('success'), 'referer');
}
以上就是小编为大家带来的浅谈js控制li标签排序问题 js调用php函数的方法全部内容了,希望大家多多支持~