-1
這些是我的代碼,當我點擊按鈕不正確提醒窗體我不知道如果即時通訊做錯了,因爲匆忙。窗體不發送值的jQuery和後
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
<link rel="stylesheet" href="form.css" />
<script>
$(document).ready(function(){
$("#button").click(function(){
var form = $("#form").serialize();
alert(form);
$.post("action.php", form, function(data){
$("#response").html(data);
});
});
});
</script>
</head>
<body>
<form id="form">
<table>
<tr colspan="2" style="text-align: center;">
<td><b>Formulario</b></td>
</tr>
<tr>
<td>Código Alumno:</td>
<td><input type="text" id="alumno" /></td>
</tr>
<tr>
<td>Códido curso:</td>
<td><input type="text" id="curso"/></td>
</tr>
<tr>
<td>Código profesor:</td>
<td><input type="text" id="profesor"/></td>
</tr>
<tr>
<td>Correo profesor:</td>
<td><input type="text" id="correo"/></td>
</tr>
<tr>
<td>Descripción:</td>
<td><textarea rows="10" cols="30"></textarea></td>
</tr>
<tr>
<td colspan="2"><input type="button" id="button" value="Enviar"/></td>
</tr>
<tr>
<td></td>
<td></td>
</tr>
</table>
</form>
<div id="response"></div>
</body>
</html>
我看不到在服務器端的價值觀和出現
Notice: Undefined index: alumno in C:\xampp\htdocs\Formulario\action.php on line 7
Notice: Undefined index: curso in C:\xampp\htdocs\Formulario\action.php on line 10
Notice: Undefined index: profesor in C:\xampp\htdocs\Formulario\action.php on line 13
Notice: Undefined index: descripcion in C:\xampp\htdocs\Formulario\action.php on line 16
請
你正在做的事情,因爲你在匆忙,這不是產生錯誤的頁面 – Ibu