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

È¥³ýHTML¸ñʽ ½ØÈ¡×Ö·û´®

  //½ØÈ¡²¿·ÖÄÚÈÝ·½·¨
        public static string strvalue(string value, int length)
        {
            string strValue = NoHTML(value);// È¥³ýHTML±ê¼Ç
            if (strValue.Length > length)
            {
                return strValue.Substring(0, length) + "...";
            }
            else
            {
                return strValue;
            }
        }
        #region »Ø³µ,¿Õ¸ñ¹ýÂË
        /**/
        /// <summary>
        /// È¥³ýHTML±ê¼Ç
        /// </summary>
        /// <param name="NoHTML">°üÀ¨HTMLµÄÔ´Âë </param>
        /// <returns>ÒѾ­È¥³ýºóµÄÎÄ×Ö</returns>
        public static string NoHTML(string Htmlstring)
        {
            //ɾ³ý½Å±¾
            Htmlstring = Regex.Replace(Htmlstring, @"<script[^>]*?>.*?</script>", "",
            RegexOpti


Ïà¹ØÎĵµ£º

HTML¼òµ¥Í¼Ïñä¯ÀÀ´¦ÀíÆ÷

ÀÏʦÁô×÷Òµ×ö¸ö¼òµ¥Í¼Ïñä¯ÀÀ¼Ó¸÷ÖÖ·­×ª+͸Ã÷+ºÚ°×Á¬Ðø´¦ÀíµÄhtml,±¾ÒÔΪºÜÈÝÒ×,
Ë­ÖªµÀһ۲ŷ¢ÏÖ»ðºü¸ß°æ±¾µÄinput file ºÍIeÖеIJ»Ò»Ñù
JSÖÐfileObj.value Ö»Äܵõ½ÎļþÃû...
¸ãµÃÄÔ´üÖ±´ó
»ðºü3ÒÔÉϰ汾ÓÐbug ÒòΪinput file ²»Ö§³Ö»ñÈ¡ÎļþÍêÕû·¾¶,±È½ÏÍ´¿à,½â¾ö²»ÁË,ËùÒÔ²»ÄÜ·¢urlµ½servletÖÐ,ÒÔÖÁÓÚÖ»ÄÜä¯ÀÀ
² ......

C#.netÖÐÓÃWinForm½ÓÊÕhtmlÒ³ÃæÏûÏ¢µÄ³ÌÐò

Ê×ÏÈдһ¸öÒ³Ãæ£¬ÉÏÃæÒª·ÅÒ»¸öButton
<html>
 <head>
  <title></title>
 </head>
 <body>
        <input id="Button1" type="button" value="button" />
 
 </body>
</html>
½«Æä±£´ ......

HTMLС¼¼ÇÉ

ģ̬¶Ô»°¿òµã»÷Á´½Ó²»´ò¿ªÐ´°¿Ú
·½·¨1£º  
  ÔÚģ̬´°¿ÚÒ³ÃæÀï¼ÓÉÏ£º  
  <head>  
  <base   target=_self   >  
  </head>  
  ''<base   target=_self   >  ''·Åµ½<head>±êÇ©ÄÚ
 ·½· ......

html fileÉÏ´«

ǰ̨  <form id="form1" runat="server" enctype="multipart/form-data">
       <input type="flie" id="xxx"> 
        </form>
ºǫ́ͨ¹ý HttpPostedFile f = Request.Files["xxx"]
½ÓÊվͿÉÒÔÁË ......

html »ñµÃä¯ÀÀÆ÷¸ß¶È

ÓÐÊ±Ò³ÃæÐèÒª»ñµÃÓû§ä¯ÀÀÆ÷µÄ¸ß¶È²ÅÄÜÈ·¶¨ÄÚÈÝÏÔʾÔÚÄÄÀ´úÂë
<div style="position:absolute; left:0; top:expression(document.body.clientHeight/2-document.body.clientHeight/4)">
</div>
ÖУ¬expression(document.body.clientHeight/2)¼´Îª»ñµÃä¯ÀÀÆ÷¸ß¶ÈÔÙ³ýÒÔ2 ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ