PHP完全自学手册(珍藏版) 中文pdf扫描版下载
初学者在ajax基础教程
<?php
$type=$_POST['type'];
$name=$_POST['name'];
if(isset($type)){
echo $type."-*-*-*-*".$name;exit;
}
$query=mysql_query("update lee_template set baizhu=$beizhu where id=$id");
?>
$name=$_POST['name'];
if(isset($type)){
echo $type."-*-*-*-*".$name;exit;
}
$query=mysql_query("update lee_template set baizhu=$beizhu where id=$id");
?>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>无标题文档</title>
<script src="jquery.min.js"></script>
<script type="text/javascript">
function loadXMLDoc(){
var t="test";
var url="http://127.0.0.1/appserv/web/test.php";
var param={
type:t,
name:'mingtian'
}
$.post(url,param,function(data){
alert(data);
});
}
</script>
<html>
<head>
<meta charset="utf-8">
<title>无标题文档</title>
<script src="jquery.min.js"></script>
<script type="text/javascript">
function loadXMLDoc(){
var t="test";
var url="http://127.0.0.1/appserv/web/test.php";
var param={
type:t,
name:'mingtian'
}
$.post(url,param,function(data){
alert(data);
});
}
</script>
</head>
<body>
<h2>AJAX</h2>
<h2>AJAX</h2>
<button type="button" onclick="loadXMLDoc()">请求数据</button>
<div id="myDiv"></div>
<div id="myDiv"></div>
</body>
</html>
</html>