Path to full-stack JavaScript (19th) html 5 insertion of html tags (1) innerHTML and outerHTML, html5outerhtml
It is difficult to use DOM operations to insert a large number of html tags to a document. You must not only create a series of nodes, but
HTML tag |javascript
/*** Remove all HTML tags and javascript tags*/function Replacehtmlandjs ($document) {$document = trim($document); if (strlen($document) 0) { return $document ; }$search = Array ("' ' si", Remove JavaScript"' ]*?>' Si ',
You need to insert a large number of HTML tags into the document. The DOM operation is cumbersome, and you will not only create a series of nodes, but also carefully link them in order.With HTML tag insertion technology, you can insert HTML code
Main content
Web standards
Browser Introduction
Introduction to Development tools
HTML Introduction
HTML Color Introduction
HTML specification
HTML structure Detailed
First, web standardsWeb Preparation
HTML 5 is a new network standard that aims to replace the existing HTML 4.01, XHTML 1.0 and DOM Level 2 HTML standards. It wants to reduce the browser's richness of Web application services (plug-in-based Rich Internet application,ria) that require
To play a Flash video in a browser, HTML documents must contain and tags and set parameters. The OBJECT tag has four settings (HEIGHT, WIDTH, CLASSID, and CODEBASE ), all of them are their attributes. If you are interested, you can understand this
PHP implementation filters various HTML tags
In the process of doing the project, we often need to filter some HTML tags to improve the security of the data, in fact, is to remove those potentially harmful to the application of data. It is used to
Method 1: Disable html
The simplest way is to directly disable HTML tags without removing them. You can use the Replace () function. For example:
Strtext = Replace (strtext, "
Or directly disable all HTML:Strtext = Replace (strtext, "
This regular expression collects in the network, but that website even copies all need to register the member, despises it, therefore does not mention him. Also, the original author could not be the site.The HTML tag has this pair, also has this
Small functions that remove HTML tags and javascript code
Function trip_html ($ html, $ len ){
// $ Html should contain an HTML document.
// In this example, the HTML tag and javascript code are removed.
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.