嗯,我有這樣的代碼:
<?php
if(isset($_POST['texto'])) {
$texto = $_POST['texto'];
echo "$texto";
?>
<form action="/env_not.php" method="POST">
<textarea id="tinyeditor" name="texto" style="width: 700px; height: 800px"></textarea>
<script>
var editor = new TINY.editor.edit('editor', {
id: 'tinyeditor',
width: 700,
height: 800,
cssclass: 'tinyeditor',
controlclass: 'tinyeditor-control',
rowclass: 'tinyeditor-header',
dividerclass: 'tinyeditor-divider',
controls: ['bold', 'italic', 'underline', 'strikethrough', '|', 'subscript', 'superscript', '|',
'orderedlist', 'unorderedlist', '|', 'outdent', 'indent', '|', 'leftalign',
'centeralign', 'rightalign', 'blockjustify', '|', 'unformat', '|', 'undo', 'redo', 'n',
'font', 'size', 'style', '|', 'image', 'hr', 'link', 'unlink', '|', 'print'],
footer: true,
fonts: ['Verdana','Arial','Georgia','Trebuchet MS'],
xhtml: true,
cssfile: 'custom.css',
bodyid: 'editor',
footerclass: 'tinyeditor-footer',
toggle: {text: 'source', activetext: 'wysiwyg', cssclass: 'toggle'},
resize: {cssclass: 'resize'}
});
</script> <input type='submit' style='text-align: right' name='enviar' value='Enviar'>
</form>
當我提交這種形式,我的$ _ POST [「texto」]回報是空白的,我怎麼能傳遞價值爲TinyEditor,以我的textarea.texto?因爲我需要用PHP獲得這個值。
謝謝!