Display javascript code _ form effects on the html page in textarea

Source: Internet
Author: User
Display the javascript code of the html page in textarea. I want to display the html page written in textarea as html.
I know that tools such as htmledit can't be used. I only need simple display.
1st Floor
You can use document. write ()
If you want to edit it, I think you may still need tools like htmledit. I am studying fckeditor, which has a few types and has fewer functions. Hey, my personal opinion, hope it will be useful to you.
2nd floor


Script
Function test ()
{
X = window. open ("about: blank ");
X.doc ument. write (tx1.value );
}
Script
Third floor
Display in multi-line text box
Function Deal (fString)
FString = replace (fString, ">", "> ")
FString = replace (fString, "<", "<")
FString = Replace (fString, "", chr (32 ))
FString = Replace (fString, "", chr (34 ))
FString = Replace (fString, "'", chr (39 ))
FString = Replace (fString, "", CHR (13 ))
FString = Replace (fString ,"

", CHR (10) & CHR (10 ))
FString = Replace (fString ,"
", CHR (10 ))
Deal = fString
End function
This function can be used
4th floor
















Use this to replace textarea
5th floor
Up
6th Floor
The html page is not displayed in textarea, but the html page displayed in textarea can be ....
Document. write (xxxxxx)
Xxxxx is the value of your textarea
7 th floor


8 th floor
This is so troublesome. You can use iframe.
9th floor
You can also edit
10th floor
Friendship up.
11 th floor



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.