html:
<audio class="mark_voice" src="" controls="controls"></audio>
JS:
function getInfo(id) {
$.ajax({
type: "post",
url: "/web/oneillegalMessages",
dataType: "json",
data: { "id": id },
async: false,
success: function(data) {
var list = data.data;
if (data.flag == "success") {
$(".mark_voice").attr("src", list.wav);
}
},
error: function(XMLHttpRequest, textStatus, errorThrown) {
console.log(XMLHttpRequest.status);
console.log(XMLHttpRequest.readyState);
console.log(textStatus);
}
})
}