springboot怎么把数据传给前端:springboot 如何引入前端 bootstrap?
这种问题网上一搜一大堆,你可以具体找一篇文章试试,遇到问题可以针对相关问题去提问。springboot通过jar包方式引入bootstrap_个人文章 - SegmentFault 思否 这不是查查就
顺晟科技
2022-10-18 13:01:27
243
$(document).ready(function() {
$('.zk_btn').click(function(e) {
var pass_symbol= $('#' + lastid).val();
var split_id = lastid.split("_");
var nextindex = Number(split_id[1]) + 1;
$.ajax({
url:"record_count_3.php?pass_symbol=" + pass_symbol,
method:"POST",
success:function(data)
{
var json = JSON.parse(data);
var txt = '';
if(json.length > 0){
for(var i=0;i<json.length;i++){
txt = "<td>"+json[i].openrate+"</td><td>"+json[i].highrate+"</td><td>"+json[i].lowrate+"</td><td>"+json[i].closerate+"</td>";
$("#example > tbody > tr").append(txt);
}
$('#example > tbody').append('<tr class="txt_ '+ nextindex +'"><td><input type="text" id="txt_'+ nextindex +'" name="symbol" class="txtfield" /></td></tr> </tbody>');
}
$('.content').html(data);
}
})
});
});
我遇到了一个问题,我正在从Ajax调用中获取数据,并在JSON变量中移动。当在输入框中写入符号并获取记录时,在第一个TD中显示,并在新行中附加。另一个插入符号并点击提交按钮获取记录并显示在第二个TD中,但问题是第二个记录显示在第一行和第二行中,就像屏幕截图一样。MCB记录显示在第2行而不是第1行。请指出我的错误
<代码><;Table ID=' Example ' border=' 1 ' CellSpacing=' 1 ' CellPadding=' 1style=' Width:900px;'>;<;头(>;)<;th>;标记符号<;/th>;<;th类=' NameCol '>;OpenRate<;/Th>;<;th类=' NameCol '>;高速率<;/TH>;<;th类=' NameCol '>;低速<;/TH>;<;th类=' NameCol '>;关闭<;/th>;<;/tr>;<;/thead>;<;正文(>;)<;tr类=' TXT_1 '>;<;TD>;<;输入类型='文本'名称=";符号";ID=' txt_1 ' Class=' txtfield '/>;<;/TD>;<;/tr>;<;/表格>;<;输入类型=";按钮";ID=";btnClick";类=";ZK_BTN ZK_BTN_提交";名称=";提交1";值=";提交";/>;
顺晟科技:
现在起作用了
<table id='example' border='1' cellspacing='1' cellpadding='1' style='width:900px;' >
<thead>
<th> Marksymbol</th>
<th class='namecol '> Openrate</th>
<th class='namecol'> Highrate</th>
<th class='namecol'> Lowrate</th>
<th class='namecol'> Closerate</th>
</tr>
</thead>
<tbody>
<tr class ='txt_1'>
<td > <input type='text' name="symbol" id='txt_1' class='txtfield'/>
</td>
</tr>
</table>
<input type="button" id= "btnclick" class="zk_btn zk_btn_submit" name="submit1" value="SUBMIT"/>
05
2022-12
02
2022-12
02
2022-12
29
2022-11
29
2022-11
24
2022-11