问题描述
我想创建一个按钮,当单击它时,将弹出甜蜜警报,并且其中有文本框,我想获取文本框的值,然后通过ajax将其发送到我的Action中,发生? 像下面的代码
$("btn").click(function(){
swal({
title:'Please text the number',text:'You can text more than one',content:"input",showcancelbutton:'true',button{
text:"Search"
}
}),function(InputData)
{
if(InputData === ""){
swal('Error','You Need To Write Something','error')
}
$.ajax({
url:@Url.action("MyActionName","MyControllerName"),method:"Post",data: InputData
})
}
})
这是我在这里的第一篇文章,非常感谢
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)