<script>
The function del (id) {
If (confirm (" is sure to delete ")) {
$. Ajax ({
Url: "del. Ashx,"
Data: {" Id ": Id},
Type: "post",
DateType: "Text",
Success: the function (res) {
If (res & gt; 0 {
Alert (" delete success ");
Location. A href="https://bbs.csdn.net/topics/Furniture.aspx";
;
} else {
Alert (" delete failed ");
}
}
})
}
}
</script>
CodePudding user response:
In yourif (res & gt; 0 {here to set breakpoints, use vs debug, if you don't use vs debugger, or you have not interrupted by vs debugger (the call stack) debugging, don't believe he will be independent programming,
CodePudding user response:
To set breakpoints, step through, using a debugger to learn programming knowledge, rather than by reading books, rote learning to learn programming,CodePudding user response:
Res, ditto to set breakpoints, use the browser debugging,