Some bugs about jsp pages

<a href="<span style="font-family: Arial, Helvetica, sans-serif;"><c:url value='/user/delete'/></span>" id="${t.id}" onclick="optDelete(this);" class="tablelink">删除</a>
How to write jquery
<pre name="code" class="html">function optDelete(a) {
		if(!confirm("Are you sure you want to delete?")) {
			return;
		}
		var f = a.id;
		window.location.href="<c:url value='/user/delete'/>?id="+f;
	}


 
 

In this way, there will be conflicts, but no error is reported, that is, sometimes it can be deleted, and sometimes it cannot be deleted.

Just modify the code and it will be fine

<a href="#" id="${t.id}" onclick="optDelete(this);" class="tablelink">删除</a>


Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325623077&siteId=291194637