<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>
答案 0 :(得分: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。