index.htmlでテキストに入力した値をajaxでindex2.phpに送信し、内容を表示したいのですが、どのように記述したらいいか分かりません。
特にindex2.phpの表示する記述をどうすればいいのか分かりません。
ご教授願います。
【index.html】
<!DOCTYPE html> <head> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script> <script> $.post('index2.php',$("#id1").serialize()); $(this).closest('form'),attr('action'); </script> </head> <html> <form action="index2.php" method="POST" id="id1"> <table> <input type="text" > <input type="submit" value="送信する"> </table> </form> </html>【index2.php】
<script> document.write(#id1); </script>回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2015/09/15 00:17
2015/09/15 00:54