成员列是多值字段值,选择后生成如下数据格式:[ "1", "2", "3"] 怎么利用js在前端进行分割为1 2 3然后分别传递给后端呢?
js前段代码:
var row = e.form.table1.current;
$.post("form506_save1.Ajax", {
姓名: row.成员,
},
function(res) {
})
后端代码:
Public Sub form506_save1_Ajax(rq as Request)
Dim e As RequestEventArgs = rq.e
Dim cmd As SQLCommand = rq.cmd
cmd.CommandText = "sel ect * from {人才库} where 姓名='" & e.Values("姓名") & "'"
Dim dt As DataTable = cmd.ExecuteReader(true)
Dim dr As Datarow = dt.DataRows(0)
If dr IsNot Nothing Then
If dr("是否组队")="未组队" then
dr("是否组队")="已组队"
Else
dr("是否组队")="已组队"
End If
End If
dt.Save
e.WriteString("")
End Sub