jQuery를 사용하여 단어 수에 문제가 있습니다. 이 방법은 내가 멈출 공간을 클릭하자 마자 작동합니다.보내기 jQuery와 공백 받기
HTML :
<textarea id="essay_content_area" name="essay_content" onkeydown="words();"></textarea>
<td>Number of words: <div id="othman"></div></td>
jQuery를 :
function words(content)
{
var f = $("#essay_content_area").val()
$('#othman').load('wordcount.php?content='+f);
}
PHP 파일 : 나는 공간을 클릭 할 때까지
if(isset($_GET['content']))
{
echo $_GET['content']; // if it works I will send this variable to a function to calculate the words
}
스크립트가 내용을 보여줍니다. 어떤 제안?
get string에 길이 제한이있는 경우가 많으므로 서버 설정을 확인하거나 게시물로 보내면 좋습니다. 게시물의 제한은 보통 더 높습니다. –
@ NiclasLarsson 좋은 지적. 사실, 적어도'multipart' 인코딩이 아닌 POST에 길이 제한이 있다고 생각합니다. –
@ NiclasLarsson 고맙습니다. 나는 그것이 단지 5000자를 필요로한다는 것을 알았습니다. 'post' 메소드로 변경하는 접근법을 알고 있습니까? – Othman