我有这个表格(它是一个网络投票),带有无线电答案,当提交来自操作文件(voting.php)的信息时我需要它打印在同一页面上而不刷新!请帮助我,我已经努力了几个小时,因为我是 Ajax jQuery 和 java 以及所有那些棘手的动态东西的新手。
<form name="myform" id="myform" action="voting.php" method="post">
<input id="radio1" type="radio" name="answer" value="answer1"><?php echo $answer1?><br>
<input id="radio2" type="radio" name="answer" value="answer2"><?php echo $answer2?><br>
<input id="radio3" type="radio" name="answer" value="answer3"><?php echo $answer3?><br>
<input id="radio4" type="radio" name="answer" value="answer4"><?php echo $answer4?><br>
<input id="radio5" type="radio" name="answer" value="answer5"><?php echo $answer5?><br>
<input id="questionId" type="hidden" name="questionId" value="<?php echo $questionId?>">
<center><input id="button" type="submit" value="Vote"></center>
</form>