运行系统时,在这如下这段代码的textarea中填入网址(如www.csdn.net),按键盘删除键一个个删除字母无法删除,只能将网址全部选择进行删除。这大概是什么原因造成啊????      echo "<tr class='tab_bg_2'>";
      echo "<td>".$LANG['joblist'][6]."&nbsp;: </td><td colspan='3'>";      if ($canedit) {
         $rand = mt_rand();
         Html::initEditorSystem("solution$rand");         echo "<div id='solution$rand_text'>";
         echo "<textarea id='solution$rand' name='solution' rows='12' cols='80'>".
                $this->getField('solution')."</textarea>  </div>";      } else {
         echo Toolbox::unclean_cross_side_scripting_deep($this->getField('solution'));
      }
      echo "</td></tr>";

解决方案 »

  1.   

     static function initEditorSystem($name) {
          global $CFG_GLPI;      echo "<script language='javascript' type='text/javascript'>";
          echo "tinyMCE.init({
             language : '".$CFG_GLPI["languages"][$_SESSION['glpilanguage']][3]."',
             mode : 'exact',
             elements: '$name',
             plugins : 'table,directionality,searchreplace',
             theme : 'advanced',
             entity_encoding : 'numeric', ";
             // directionality + search replace plugin
          echo "theme_advanced_buttons1_add : 'ltr,rtl,search,replace',";
          echo "theme_advanced_toolbar_location : 'top',
             theme_advanced_toolbar_align : 'left',
             theme_advanced_buttons1 : 'bold,italic,underline,strikethrough,fontsizeselect,formatselect,separator,justifyleft,justifycenter,justifyright,justifyfull,bullist,numlist,outdent,indent',
             theme_advanced_buttons2 : 'forecolor,backcolor,separator,hr,separator,link,unlink,anchor,separator,tablecontrols,undo,redo,cleanup,code,separator',
             theme_advanced_buttons3 : ''});";
          echo "</script>";
       }
    这段代码具体是什么意思???
      

  2.   


    输出什么我知道,就是tinyMCE的一些属性的定义不清楚。我定义了上面的几个,导致我输入地址什么的时候,删除不掉。
      

  3.   


    如果你textarea 的值打印正确的话,应该就不是PHP的问题