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

×Ö·û´®½ØÈ¡£¨°üÀ¨html£¬BasicPage.csÀàʹÓã©

    /// <summary>
    /// ½Ø¶Ï×Ö·û´®(ÖÐÎļÆÒ»¸ö×Ö·û¿í¶È£¬ÆäËü¼Æ°ë¸ö×Ö·û¿í¶È)
    /// </summary>
    /// <param name="input">Ðè½Ø¶ÏµÄ×Ö·û´®</param>
    /// <param name="length">×Ö·û¿í¶È</param>
    /// <returns>½Ø¶Ï×Ö·û´®(´ø"...")</returns>
    protected string truncatedChars(string input, int length)
    {
        input = Server.HtmlEncode(input);
        if (input.Length > length)
        {
            int pos = 0;
            string result = "";
 
            foreach (char chr in input)
            {
                if (Regex.IsMatch(chr.ToString(), "[^\x00-\xff]"))
                {
                    pos += 2;
                }
                else
                {
                    pos += 1;
                }
                result += chr.To


Ïà¹ØÎĵµ£º

vim html xml ×Ô¶¯²¹È«(ÔÚclosetag.vim ÉÏ×÷Á˵ãÐÞ¸Ä)

µ±ÊäÈë ¡·Ê±×Ô¶¯²¹È« µ±ÊäÈë¡¶/ʱ×Ô¶¯²¹È«
“£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½
" File: closetag.vim
" Summary: Functions and mappings to close open HTML/XML tags
" Uses: <C-_> -- close matching open tag
" Author: Steven Mueller <di ......

ËÑË÷֮· c#´ÓhtmlÖÐÌáÈ¡Îı¾

Ö±½Ó·â×°³ÉÒ»¸öÀàµÄ£¬ÓÃÆðÀ´»¹Í¦·½±ãµÄ
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Text ......

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


            string tent = this.TextBox_info.Text.Replace("<", "&lt;").Replace(">", "&gt;").Replace(" ", "&nbsp;&nbsp;&nbsp;&nbsp;").Trim().Replace("\n", "<br/>");
       & ......

Ö´ÐÐAJAX·µ»ØHTMLƬ¶ÎÖеÄJavaScript½Å±¾

Èç¹ûAJAX¼ÓÔØµÄÊý¾ÝÊÇÒ»¸öHTMLƬ¶Î£¬¶øÇÒÕâ¸öHTMLƬ¶Î»¹°üº¬½Å±¾<script>¿é£¬ÄÇôÔÚÄã°ÑÕâÊý¾ÝxmlHttp.responseTextÓÃinnerHTML·½·¨²åÈëµ½µ±Ç°ÎĵµÒ»¸öÔªËØÖУ¬Äã»á·¢ÏÖAJAX¼ÓÔØ»ØÀ´µÄ½Å±¾¸ù±¾Ã»ÓÐÖ´ÐС£ÕâÊÇAJAX¿ª·¢Öкܳ£¼ûµÄÎÊÌ⣬Èç¹ûÄã²»ÊÇÒ»Ö±ÔÚÓÃJavaScript¿ò¼Ü×ö¿ª·¢£¬ÏàÐÅÄãÔç¾Í·¢ÏÖÕâ¸öÎÊÌâÁË¡£±¾ÎÄ·ÖÎöÁËÁ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ