js 替换html
2024-09-05 06:55:42
function getInfo(){
var player_name=$("#name").val();
$.ajax({
url: 'get_wefare',
method: 'POST',
dataType: 'json',
data: {name:player_name},
success: function(res) {
// console.log(res);
if(res.code==0){
var tr_td = '';
tr_td+="<td>"+res.content.PlayerID+"</td><td>"+res.content.NickName;
tr_td+="</td><td>"+res.content.se+"</td><td>"+res.content.ceer;
tr_td+="</td><td>"+res.content.Level+"</td>";
tr_td+='<td><input type="text" class="form-control" id="buy_num" value=""/></td><td><button class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal">发放</button></td>';
$("#my_tr").html(tr_td);
}else{
toastr.error(res.msg);
}
},
error:function(res){
toastr.error(res.msg);
}
});
}
最新文章
- web.config SetAttributes
- MySQL运行状态show status中文详解(转)
- Human Gene Functions(poj 1080)
- ruby杂记
- javascript事件学习笔记
- Unity3d 随机地图生成
- [TypeScript] Inheritance
- Android中获取电池电量
- linux centos 卸载jdk
- [Oracle]审计Audit
- 如何获取Linux-gate.so.1动态库
- python_flask框架学习之路(1)
- 将本地代码通过git命令上传到github的流程
- 337. House Robber III二叉树上的抢劫题
- CSS:概念和三种样式
- Scala_特质
- MVC學習網站
- Ubuntu16.04下的主题美化
- Spring Security构建Rest服务-0700-SpringSecurity开发基于表单的认证
- H5调试工具 - weinre远程调试工具