Don’t panic in case of data tilt, teach you to easily obtain the slope of table tilt>>>
The get method is not supported. The reason why I made a mistake is that in JSP, I want hyperlink a to be submitted by post, but there was an error when writing JS code here
<script type="text/javascript">
$(function(){
$(".delete").click(function(){
var href = $(this).attr("href");
$("form").attr("action",href).submit();
//alert("ok");
return false;
})
})
</script>
JS code itself is not wrong, the error is the configuration of hyperlinks
<form action="" method="post">
<input type="hidden" name="_method" value="delete" />
</form>
<a href="emp/${emp.id%20}">Delete</a>
The above is the JSP code, and the hyperlink A is missing a class = “delete”
That’s right
<form action="" method="post">
<input type="hidden" name="_method" value="delete" />
</form>
<a class="delete" href="emp/${emp.id%20}">Delete</a>
Similar Posts:
- CSRF verification failed. Request aborted [How to Solve]
- Ajax submitting datagram in firebox_ ERROR_ DOCUMENT_ NOT_ Cached error
- [DOM] Input elements should have autocomplete attributes (suggested: autocomplete=’tel’, …
- PHP use$_ SERVER[‘PHP_ Self ‘] to get the current page address and its security issues
- Python Error:Exception Value:can only concatenate str (not “bytes”) to str
- The difference between Top.location and window.location.href
- [Solved] Computed property “xxxx” was assigned to but it has no setter
- curl HTTP Error 400. The request is badly formed.
- When using bootstrap modal box, uncaught typeerror: $(…). Modal is not a function
- What happened to CodeIgniter disallowed key characters?