0
<script type="text/javascript" charset="utf-8">
function PreviewContent(lang) {
    window.open("<?php echo base_url('system/pages/preview/about/') ?>" + lang, "ckeditor_preview", "location=0,status=0,scrollbars=1,width=980,height=600");
}

</script>

<tr>                                            
<td valign="top"><?php echo lang('label_content'); ?></td><td>
                                             <?php                                              echo $this->ckeditor->editor("content[$lang_k]", $text->content);                   ?>                                          
<input type="button" value="Preview Content" onclick="PreviewContent('/<?php echo $lang_k;    ?>');" /></td>

打开窗口脚本是

<script>
$().ready(function() {
$('.preview_content').html(window.opener.jQuery("input[name=content]<?php echo $p_lang; ?>").value);
});    
</script>

<div class="preview_content"></div>
4

1 回答 1

0

更正。

  • $(document).ready
  • input[name="content"]
  • content['".$lang_k.".]

    $('.preview_content').html(window.opener.jQuery("input[name="content"]<?php echo $p_lang; ?>").value);

.html()用于在选定元素内设置 HTML。

于 2013-03-19T05:56:07.577 回答