그래서 현재 나는 sendchat.php에 사람이 입력하기를 원하는 메시지를 보내는 간단한 폼을 가지고 있습니다. iframe을 사용하여 정말로 새로 고치지 않고 사용할 수있는 문제는 아닙니다. 누군가가 다른 페이지로 이동하거나 새로 고침하는 것을 의미하는 BACKGROUND 제출 양식을 수행하는 방법에 대한 올바른 코드를 알려줄 수 있습니까?GET 폼과 버튼을 사용하여 요청하기
<form target="chat" action="sendchat.php" method="GET">
<input type="text" class="form-control" id="message" maxlength="255" name="message" type="submit" placeholder="Enter your message or use !help for help."><br>
<div class="col-xs-6 text-right">
<button type="submit button" class="btn bg-teal-400 btn-labeled btn-labeled-right"><b><i class="icon-circle-right2"></i></b> Send Message</button>
</div>
</form>
<style> .iframe { display: none; border-color: rgba(225, 225, 225, 0); border-width: 0px; } </style>
<iframe style="" name="chat" width="0px" height="0px" id="chat" onload="clearTextarea();"></iframe>
새로 고침없이 자동 업데이트를 받으려면. 귀하의 사이트에 AJAX를 구현해야합니다. 여기를 참고하십시오 : http://stackoverflow.com/questions/16616250/form-submit-with-ajax-passing-form-data-to-php-without-page-refresh –