我正在尝试构建一个字符串参数以作为参数发送到 AJAX 调用,但是我尝试构建字符串的各种方法都没有奏效,包括简单的连接。有什么建议吗?
var partRelationType = checkBox.name;
var partNumber = checkBox.value;
var isChecked = checkBox.checked;
$.ajax({
url: '@Url.Action("SetSelectedPart", "Select", new { customerEstimateKey = ViewBag.CustomerEstimateKey, type = partRelationType, partNumber = partNumber, isSelected = isChecked })',
type: "POST",
async: true
});