このコード<td><c:if test="${status == 1}">Aktiv</c:if></td>
アヤックスに<C:IF>
のようないくつかのJSTLコードを書きたいけど、それはJSTLは
function myfunction(cd){
$("#datatable tbody").empty();
$.ajax({
url :'/KurirCC/management-user-by-request.html',
cache :true,
data :{"kode":cd},
dataType :"json",
type : "GET",
contentType : "application/json; charset=utf-8",
success : function(jsondata){
$.each(jsondata.data,function(i,obj){
var status = obj.sts;
tableHtml ="<tr> <td>"+ obj.id_mobile + "</td> <td>" + obj.nama +"</td> <td>"+ obj.username +"</td> <td>"
+ obj.kota + "</td> <td><c:if test="${status == 1}">Aktiv</c:if></td><td align='center'><button type='button' class='btn tom-history' title='History' ></button></td> </tr>";
$(tableHtml).appendTo('#datatable tbody');
});
}
});
}
を動作しないdoest動作しない、あなたのhelp.Iを必要とし、 動作しません。問題はありますか?
これは意味をなさない。物事の仕組みに関する基本的な説明については、複写を参照してください。 JavaScriptには独自の 'if()'文があります。それを利用する。 – BalusC