jquery e is undefined的原因,请问是怎么回事啊
<scripttype="text/javascript">$(function(){varobj=document.getElementById('selectt');...
<script type="text/javascript">$(function(){ var obj=document.getElementById('selectt'); $.ajax({ type: "POST", url:'category/ajax_post_lang', data:'lid=2', dataType:'json', success: function(data){ var tr; $.each(data,function(i,item){ tr+='<tr><td style="text-align:center; line-height:30px;">'+item.id+'</td><td style="text-align: left;">'+item.name+'</td><td style="text-align: left;">'+item.lang_id+'</td><td style="text-align: center;">'+item.sort+'</td><td align="center"><button type="button" class="btn btn-primary btn-sm" onclick="location.href=\'category/show/?id='+item.id+'\';"><span class="glyphicon glyphicon-refresh" ></span> 修改</button><button type="button" class="btn btn-danger btn-sm" onclick="location.href=\'category/del/?id='+item.id+'\';">删除 <span class="glyphicon glyphicon-remove"></span></button></td> </tr>'; $.each(item.childs,function(j,item1){ if(item1.pid=item.id) tr+='<tr><td style="text-align:center; line-height:30px;">'+item1.id+'</td><td style="text-align: left;padding-left:40px;">'+item1.name+'</td><td style="text-align: left;">'+item1.lang_id+'</td><td style="text-align: center;">'+item1.sort+'</td><td align="center"><button type="button" class="btn btn-primary btn-sm" onclick="location.href=\'category/show/?id='+item1.id+'\';"><span class="glyphicon glyphicon-refresh"></span> 修改</button><button type="button" class="btn btn-danger btn-sm" onclick="location.href=\'category/del/?id='+item1.id+'\';">删除 <span class="glyphicon glyphicon-remove"></span></button></td> </tr>'; }); }); $("#list").html(tr); } }); });</script>
展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询