1. Prepare the data, here I read a data from a database with HTML tags and script scriptsCode:@Before Public voidinit () {SQLService SQLService=NewSQLService (); Sqlservice.regist (NULL); BASEDAO BD=NewBasedao (); String SQL= "SELECT * from T where
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, "
Reference:Http://www.cnblogs.com/newsouls/p/3995394.htmlhttp://blog.csdn.net/he20101020/article/details/21228311Content: PackageUtils;ImportJava.util.regex.Matcher;ImportJava.util.regex.Pattern;/*** Note: \ n Enter (\u000a) * \ t horizontal tab (\u00
Remove all tags in HTML code
Copy codeThe Code is as follows: '******************************
'Function: RemoveHTML_A (strText)
'Parameter: strText, string to be processed
'Prepared by: alixixi
'Date: 2007/7/12
'Description: removes all tags from
Method One: Disable HTMLThe easiest way to do this is to disable HTML tags directly without removing them. You can use the Replace () function. For example:
StrText = Replace (StrText, "
or disable all HTML directly:StrText = Replace (StrText,
asp.net| Insert | server | script | client | control | Chinese INTRODUCTION
Although technically speaking, Microsoft? All of the functionality of the ASP.net server control can be performed on the server side, but typically by adding client script
In the Ajax application environment, the browser does not allow the XMLHttpRequest component to request cross-origin resources for security reasons. In many cases, this restriction causes a lot of inconvenience. Many colleagues have studied various
Remove all tags in HTML code
Copy Code code as follows:
'******************************
' Function: Removehtml_a (strText)
' Parameters: StrText, strings to be processed
' Author: Arisisi
' Date: 2007/7/12
' Description: Remove all
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.