PHP变量无法获取百度文本编辑器的内容

为什么我的$sjj变量获取不到文本其中的内容呢,也echo不出来!!各位高手

直接上代码:


<php

$sjj = $_get['sj'];

echo $sjj;

?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
        "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <title>完整demo</title>
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
    <script type="text/javascript" charset="utf-8" src="ueditor.config.js"></script>
    <script type="text/javascript" charset="utf-8" src="ueditor.all.min.js"> </script>
    <script type="text/javascript" charset="utf-8" src="lang/zh-cn/zh-cn.js"></script>

    <style type="text/css">
        div{
            width:100%;
        }
    </style>
</head>
<body>
<div>
    <h1>完整demo</h1>
    <script id="editor" type="text/plain" style="width:1024px;height:500px;"></script>
</div>

<form action="#" method="post">
<script type="text/javascript">

    //实例化编辑器

     var ue = UE.getEditor('editor');
     var sj = getPlainTxt() 

</form>

</script>
</body>
</html>
  1. var_dump($_GET); 先看一下。
  2. 注意GET的大写。

你又没有提交sj的值怎么获取?而且表单和script结束标签都不对

 <form action="#" method="post" onsubmit="setV(this)">
<input type="hidden" name="sj"/>
<script type="text/javascript">
function setV(f){
    //实例化编辑器

     var ue = UE.getEditor('editor');
     var sj = getPlainTxt() 
        f.sj.value=sj;//提交表单时赋值给隐藏变量

}
</script>
<input type="submit" value="提交"/>
</form>
 $sjj = $_GET['sj'];