0
내 Asp MVC4 프로젝트에서 Ajax를 사용하고 있습니다. 내 문제는 Ajax를 사용하여 내 인덱스에 데이터를 삽입하려고하면 마지막 데이터 만 나타나고 다른 데이터는 눌려져 있습니다. 내 인덱스의 모든 데이터를 표시하는 삽입 모드를 사용할 수 있습니까?Ajax에서 삽입 모드를 사용하는 방법
<script type="text/javascript">
var id = '@Html.DisplayFor(modelItem => item.ID_question)'
$.ajax({
url: '/Question/ListeOfChoiceSimple/' + id,
type: 'GET',
success: function (result) {
$("#@Html.DisplayFor(modelItem => item.ID_question)").html(result);
}
});
$.ajax({
url: '/Question/ListeOfChoiceDirige/' + id,
type: 'GET',
InsertionMode : 'InsertionMode.InsertAfter',
success: function (result) {
$("#@Html.DisplayFor(modelItem => item.ID_question)").html(result);
}
});
</script>
어떤 도움
'html' 대신'append'를 사용하십시오. –