我的 html 文件中有一个textarea
,我需要将其中的数据发送textarea
到数据库。但是,textarea
发送没有enter
空格的数据。所以这样的数据:
Shortly after reading a few books on web design, I was hooked. I wanted to know everything and anything about it. I was designing websites any chance I could.
I spent almost all of my savings buying more books on different programming languages and other nerdy computer gear.
在数据库中会是这样的。
Shortly after reading a few books on web design, I was hooked. I wanted to know everything and anything about it. I was designing websites any chance I could. I spent almost all of my savings buying more books on different programming languages and other nerdy computer gear.
所以我决定将 textarea 更改为 ackeditor
以将数据作为 html 发送。但是现在我有一个jQuery
方法的问题textarea
,现在它不起作用了。
HTML:
<td>
<textarea maxlength="5000" id="blah" cols="100" rows="20" name="essay_content" class="ckeditor" onkeyup="words();">
</textarea></td>
jQuery:
function words(content)
{
var f = $("#blah").val()
$('#othman').load('wordcount.php?content='+ encodeURIComponent(f));
}
现在它对我不起作用,因为文本区域是 CkEditor ...有什么建议吗?