<a href="javascript:;" onclick='deleteOne("${basePath}DeleteOneServlet.action",${message.id})'>删除</a>
<input type="hidden" name="id" />
function deleteOne(url,id){
if(confirm("确定删除吗?")){
this.mainForm.action=url;
this.mainForm.id.value=id;
this.mainForm.submit();
}
}
<input type="hidden" name="id" />
function deleteOne(url,id){
if(confirm("确定删除吗?")){
this.mainForm.action=url;
this.mainForm.id.value=id;
this.mainForm.submit();
}
}
2018-03-13
<a href="javascript:;" onclick='deleteOne("${basePath}DeleteOneServlet.action",${message.id})'>删除</a>
js代码
<script type="text/javascript">
function deleteOne(url,id){
if(confirm("确定删除吗?"))
window.location.href=url+"?id="+id;
}
</script>
js代码
<script type="text/javascript">
function deleteOne(url,id){
if(confirm("确定删除吗?"))
window.location.href=url+"?id="+id;
}
</script>
2018-03-13