Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

TextBox ³¬Á´½ÓÌæ»»³ÉHTML³¬Á´½ÓÐÎʽ


            string tent = this.TextBox_info.Text.Replace("<", "&lt;").Replace(">", "&gt;").Replace(" ", "&nbsp;&nbsp;&nbsp;&nbsp;").Trim().Replace("\n", "<br/>");
            Regex regex = new Regex(@"(?:https?://|www\.)(?:[\w-]+\.)+[\w-]+(?:/[\w- ./?%&=]*)?", RegexOptions.ECMAScript);
            MatchCollection mc = regex.Matches(tent);
            string text = "";
            List<string> list = new List<string>();
            foreach (Match m in mc)
            {
                list.Add(m.ToString());
            }
            for (int i = 0; i < list.Count; i++)
            {
                for (int j = i + 1; j < list.Count; j++)
                {
                    if (list[i] == list[j])
                    {
                        list.Remove(list[j]);
           &


Ïà¹ØÎĵµ£º

ÄãÕæµÄÁ˽âhtmlÂ𣿠֮script±êÇ©½éÉÜ

Ò»£®ÊôÐÔ£º
src£º¸ÃÊôÐÔÖ¸¶¨ÍⲿJavaScriptÎļþµÄµØÖ·£¬¿ÉÒÔ¿çÓò¡£Èç¹ûÖ¸¶¨Á˸ÃÊôÐÔ£¬ÄÇôscript±êÇ©ÖеÄÄÚÈݾͻᱻºöÂÔ¡£
 
type£ºÖ¸¶¨ËùʹÓõĽű¾ÓïÑÔ£¬¿ÉÒÔ¸²¸ÇĬÈϵĽű¾ÓïÑÔ£¨¼´ÔÚ<META http-equiv="Content-Script-Type" content="type">Öж¨ÒåµÄ½Å±¾ÀàÐÍ
£©¿ª·¢Õß±ØÐëÖ¸¶¨¸ÃÊôÐÔ£¬¸ÃÊôÐÔûÓÐĬÈÏÖµ¡ ......

ASP.NET Çå³ý HTML ±ê¼Çº¯Êý

using System.Text.RegularExpressions;   //ÒýÈëµÄÃüÃû¿Õ¼ä
ÒÔÏÂΪÒýÓõÄÄÚÈÝ£º
//Çå³ýHTMLº¯Êý
    public static string NoHTML(string Htmlstring)
    {
        //ɾ³ý½Å±¾
        Htmlstr ......

Sql°æ±¾³ýÈ¥html²¢½ØÈ¡Ö¸¶¨³¤¶ÈµÄ×Ö·û´®

set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
Go
----½ØÈ¡×Ö·û´®£¬²¢³öÈ¥html
create FUNCTION [dbo].[CutString] (@str varchar(1000),@length int) 
RETURNS varchar(1000) AS 
BEGIN
 declare @mainstr varchar(1000)
 declare @substr varchar(1000)
 if(@str is not null or @st ......

Html/Jsp³£ÓõÄÒ³ÃæÌø×ª·½·¨

µÚÒ»ÖÖ£º
<script language="javascript" type="text/javascript">
    window.location.href="login.jsp?backurl="+window.location.href;
</script>
µÚ¶þÖÖ£º
<script language="javascript">
    alert("·µ»Ø");
    window.history.back ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ