在没有jQuery / Ajax的同一个HTML / PHP页面中提交,iFrame是唯一的选择吗?

I want to make the output of a <form> in the same page of submit, I did it with html <iframe>, is there any alternative besides jQuery and Ajax?

Thanks in advance.

If you leave the "action" attribute of the form tag empty it will be submitted to the same page. You can then check to see if the form has been submitted and process the page accordingly.

Maybe something like:

<?php
 if($_POST['submitted']){
  echo "I have been submitted";
echo "<br/>";
  echo $_POST['text_input'];
}
?>
<form method="post">
<input type="text" name="text_input">
<input type="submit" value="Submit" name="submitted">
</form>