Jquery code:
$(" # dataList. Text - center "). Click (function () {
Var id=$(" # dataList input [type="hidden"] "). The val ();
Alert (id);
If (confirm (" sure to delete?" )) {
Window. The location="${pageContext. Request. ContextPath}/role/del? Id="+ id;
}
});
The JSP code:
Choose delete, the parameter Id is always 1.,,,,,,,, choose any one to delete, Id is 1
CodePudding user response:
Id is a unique identifier, repeated problems will emergeCodePudding user response:
This code is blind to write simple and correct term a lot, I just wrote a most simple and suitable for JSP
Seriously, only master to the point you don't use binding, traps pit
- Related
- Links:
- CodePudding