Area 区域实现post提交数据的js写法_javascript技巧

WBOY
Release: 2016-05-16 16:51:35
Original
758 people have browsed it

在mvc区域的里 实现post 提交数据 的js写法!

复制代码代码如下:

$("#btnSava").click(function () {
if ($("#text").val()=="") {
alert("请输入你要说的话!~!");
} else {
$.post("/control/action", { id: $("#text").val()}, function (data) {
if (data == 0) {
alert("发表成功,我们会尽快通知直销商回复");
window.location.reload();
} else if (data== 1) {
alert("不能给自己留言的哦!~");
} else(data== 3) {
alert("还没有登陆,请先登陆再发表评论");
}
});

}

});
Related labels:
source:php.cn
Statement of this Website
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