The data on a form is read out from the php background, and json_encode is carried out on it. How does JSON _ ENCODE transfer each item to the corresponding html element? I know the html method of jquery, but I don’t know the syntax.

  question

if(! empty($_GET[‘id’])) {
$sale= M(“sale”);
$vo= $sale->getById($_GET[‘id’]);
//dump($vo);
if($vo) {
echo json_encode($vo);
bracket

Front-end ajax writes like this
function edit (id)
bracket
$(‘#tan’).css(‘display’,”);
$.ajax({
type:’post’,
url:”Root/livecrm/index.php?m=Cuactivity&a=edite&id=”加id,
success:function(data){
$(#name).html({name});
bracket
})
This is how the data is assigned to the corresponding elements after ajax is completed, for example, a username name, sex, ajax request is edited, the value is taken out from the background, and json is given to the responding elements through html method.

$(‘#name’).val({name}) assigns a value to input with id name. here is a summary of many questions about jQuery:http://www.zoneself.org/category/jquery