需要在传输的前后加上"来转义为" 从而保证字符串的传输
html += "<td><a onclick='update(" + result[i].id + ","" + result[i].name + "")' class='ui primary button'>修改</a>"
function update(id, name) {
document.getElementById("id").value = id;
document.getElementById("name").value = name;
$('.update.modal')
.modal({
inverted: true
})
.modal('show')
};