自己精简的版本:
超链接的编写(name为中文):
<a onclick="deleteBrandById('晓明')" href="javascript:void(0)">删除</a>
js编写
function deleteBrandById(name) {
var param = "name=" + name;
var url = "/brand/deleteBrandByIds.do?" + param;
//生成自定义表单提交js的超链接,使用post请求
var formObject = document.createElement('form');
document.body.appendChild(formObject);
formObject.action = url;
formObject.setAttribute('method', 'post');
formObject.submit();
}