易截截图软件、单文件、免安装、纯绿色、仅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


相关文档:

[转帖]html中id和name属性的区别


到底元素的id和name有什么区别阿?为什么有了id还要有name呢?!
id的主要用途:
在客户端页面作为对象的唯一表示,同一个页面中不允许出现多个相同的id.可以使用javascript的document.getElementById('id')来获取对象.
name的具体用途有:
用途1:
作为可与服务器交互数据的HTML元素的服务器端的标示,比如input、sele ......

javascript之HTML(select option)详解

一、基础理解:
var e = document.getElementById("selectId");
e. options= new Option("文本","值") ;
//创建一个option对象,即在<select>标签中创建一个或多个<option value="值">文本</option>
//options是个数组,里面可以存放多个<option value="值">文本</option>这样的标签
1:opt ......

TextBox 超链接替换成HTML超链接形式


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

关于在html页面中创建fckeditor

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
    <title>文本编辑器</title>
     <meta http-equiv="C ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号