In the mvc area, implement the js writing method of post submission data!
$("#btnSava").click(function ( ) {
if ($("#text").val()=="") {
alert("Please enter what you want to say!~!");
} else {
$.post("/control/action", { id: $("#text").val()}, function (data) {
if (data == 0) {
alert(" Posted successfully, we will notify direct sellers to reply as soon as possible");
window.location.reload();
} else if (data== 1) {
alert("You can't leave a message for yourself! ~");
} else(data== 3) {
alert("Not logged in yet, please log in first before posting a comment");
}
});
}
});
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn