81,094
社区成员
发帖
与我相关
我的任务
分享
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>测试页面</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<script type="text/javascript" src="./jquery-1.8.2.js"></script>
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
<script type="text/javascript">
function ok(){
var date=$("#ff").serialize();
$.ajax({
type:"post",
url:"./message.php", //这里指向你要操作路径
data:date,
success:function(msg){
console.log(msg);
}
});
}
</script>
</head>
<body>
<form id="ff">
短信内容:<input type="text" name="name"/><br/>
手机号码:<input type="text" name="password"/><br/>
模板ID:<input type="text" name="id" value="40285284557358c101557b01f4550050">
<input type="button" value="提交" onclick="ok();"/>
</form>
</body>
</html>
/*************************************/
<?php
$name = $_POST['name'];
$password = $_POST['password'];
$id = $_POST['id'];
/******这里处理你要的逻辑************/
$content = array('1'=>1,'2'=>2); //这个数据是死的,改成获取你想要的
echo json_encode($content);