SoFunction
Updated on 2025-02-28

JavaScript code showing html page in textarea

I want the html page written in textarea to display in html form
I know there are tools like htmledit. I can't use as many functions as it can. I just need to simply display it.
1st floor
If you only want to display, you can use ()
If you still need to edit, I think you may still use tools such as htmledit. I am now studying fckeditor. It has several types and fewer functions. Hehe, my personal opinion, I hope it will be useful to you.
2nd floor
<textarea   id=tx1></textarea>   
  <input   type=button   value="show"   onclick="test();")>   
  <script>   
  function   test()   
  {   
  x=("about:blank");   
  ();   
  }   
  </script>
3rd floor
Display in multi-line text box
  function   Deal(fString)   
    fString   =   replace(fString,   "&gt;",   ">")   
    fString   =   replace(fString,   "&lt;",   "<")   
    fString   =   Replace(fString,"&nbsp;",chr(32))   
    fString   =   Replace(fString,"&quot;",chr(34))   
    fString   =   Replace(fString,"&#39;",chr(39))   
    fString   =   Replace(fString,   "",   CHR(13))   
    fString   =   Replace(fString,   "</P><P>",   CHR(10)   &   CHR(10))   
    fString   =   Replace(fString,   "<BR>",   CHR(10))   
    Deal   =   fString   
  end   function   
This function can be used
4th floor
<OBJECT   class=EditorArea   id=objContent   classid=clsid:2D360201-FFF5-11D1-8D03-00A0C959BC0A   viewastext>   
  <PARAM   NAME="ActivateApplets"   VALUE="0">   
  <PARAM   NAME="ActivateActiveXControls"   VALUE="0">   
  <PARAM   NAME="ActivateDTCs"   VALUE="-1">   
  <PARAM   NAME="ShowDetails"   VALUE="0">   
  <PARAM   NAME="ShowBorders"   VALUE="-1">   
  <PARAM   NAME="Appearance"   VALUE="1">   
  <PARAM   NAME="Scrollbars"   VALUE="-1">   
  <PARAM   NAME="ScrollbarAppearance"   VALUE="1">   
  <PARAM   NAME="SourceCodePreservation"   VALUE="-1">   
  <PARAM   NAME="AbsoluteDropMode"   VALUE="0">   
  <PARAM   NAME="SnapToGrid"   VALUE="0">   
  <PARAM   NAME="SnapToGridX"   VALUE="50">   
  <PARAM   NAME="SnapToGridY"   VALUE="50">   
  <PARAM   NAME="UseDivOnCarriageReturn"   VALUE="-1">   
  </OBJECT>   
Use this instead of textarea
5th floor
up
6th floor
It will not be displayed in textarea, but it is OK to display the html page in textarea as an html page...
  (xxxxxx)   
xxxxx is the value of your textarea
7th floor
<textarea      rows="20"   cols="50"></textarea>   
  <Script   Language="JavaScript">   
            var   oImg=("IMG");   
            ="http:///images/avatars/";   
            (oImg);   
  </Script>
8th floor
It's so troublesome, just use an iframe
9th floor
Can also be edited
10th floor
Friendship up.
11th floor
<div   style="width:300px;height:100px;border:1px   solid   red;"   contenteditable=true   >   
  </div>   
  <input   type=button   onclick="   ='<font   color=green>asdfs</font>'"   value="set">