数据库中转换汉字为英文:dbo.f_FirstLetters(字段名)
//点击搜索条件
$("#searchtext").keyup(function () {
if ($("#searchtext").val() != "" && $("#searchtext").val() != null) {
$.ajax({
url: "/Mall/SearchWaresName",
type: "GET",
data: {
searchtext: $("#searchtext").val()
},
success: function (data) {
$("#wareslistresult").html("");
if (data != null) {
for (var i = 0; i < data.length; i++) {
var a = "<a href='/url" + data[i].ID + "'><div class='qsearch'>" + data[i].Name + "</div></a>";
$("#wareslistresult").append(a);
}
}
return;
}
});
}
});