您好,登錄后才能下訂單哦!
在頁(yè)面中我載入了ckEditor作為我程序內(nèi)容的輸入。
- <textarea name="content" id="content"></textarea><br>
- <input type="submit" value="submit" onclick="submit()">
- <script src="/ckeditor/ckeditor.js"></script>
- <script type="text/javascript">
- CKEDITOR.replace('content',{
- filebrowserBrowseUrl: '/ckfinder/ckfinder.html?Type=Files',
- filebrowserImageBrowseUrl: '/ckfinder/ckfinder.html?Type=Images',
- filebrowserFlashBrowseUrl: '/ckfinder/ckfinder.html?Type=Flash'
- });
- </script>
但是我頁(yè)面中是使用Jquery進(jìn)行頁(yè)面提交的,但是直接用$("#content").val()是無(wú)法拿到content內(nèi)容的。這里我們需要使用ckEditor內(nèi)置的函數(shù)來(lái)拿到這個(gè)內(nèi)容。
- var oEditor = CKEDITOR.instances.content;
- var content = oEditor.getData();
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。