Modification link of index page
<div><a href="{:url('admin/broadcast/update',['id'=>$v['id'] ])}">Modify</a></div>
jquery
$(function(){
$('#upda ').click(function(id){
var id = $(this).attr('id'); 'Post',
Url: "{: url ('admin/" broadcast/update')} ",
Data: $ ('#form'). Serialize (),
dataType:'json',
alert("success");
## # public function update(){ $id=$this->request->get('id'); print_r($id); if($this->request->isPost()){ $post=$this->request->post(); table('tplay_broadcast')-> where('id',$id)->update($post); 'tplay_broadcast')->where('id',$id)->find(); $this->assign('data',$data); return $this->fetch(); } }
Solved because after assigning the value to the front end, the <textarea value={data.name}> used by the front end should be assigned the value here</textarea>, and the value in the angle brackets is what the back end sees
I don’t understand your question, can you provide a picture?