我有一个如下的AJAX请求:
import UIKit
func BMIcalc (weight: Int, height: Int) -> Int {
let BMI = weight/height
if BMI > 25 {
print ("you are overweight")
}
else if BMI > 18.5 && BMI < 25 {
print("you are normal weight")
else
}
return BMI
}
print (BMIcalc(weight: 60, height: 180))
根据输入数据($.ajax({
url: 'TypeState',
type: 'POST',
data: {
state_name: name,
city_type: type
},
success: function(response) {
alert(response.message);
data = response.data;
$('.tr').remove();
for (i = 0; i < response.data.length; i++) {
$("#table").append("<tr class='tr'> <td> " +
response.data[i].user_name + " </td> <td> " +
response.data[i].user_contact + " </td> <td> " +
response.data[i].user_license + " </td> <td> " +
response.data[i].user_email + " </td> <td> " +
response.data[i].state + " </td> <td> " +
response.data[i].city);
}
},
error: function(response) {
alert("unable to pull up any users for the selected state");
}
});
和state_name
),我会得到很多用户对象响应,这些响应会附加到表中以显示在JSP页面中。
我希望让客户端能够选择其中一些用户对象并发送新请求。谁能告诉我该怎么做?