易截截图软件、单文件、免安装、纯绿色、仅160KB

aspx 生成HTML 静态页


aspx 生成HTML 静态页 :http://www.cnblogs.com/ejiyuan/archive/2007/11/09/954325.html
 
cs 页:
using System;
using System.Data;
using System.Configuration;
using System.Collections;
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;
using System.IO;
using System.Net;
namespace WebHtml
{
    public partial class _Default : System.Web.UI.Page
    {
         protected void Page_Load(object sender, EventArgs e)
        {
        }
        protected void Button1_Click(object sender, EventArgs e)
        {
            string strDate = DateTime.Now.ToString("yyMMdd") + "\\" + DateTime.Now.ToString("yyyymmddhhmmss");
            string strFileName = strDate + ".shtml";//存储到数据库中
            string strTitle=Request.Form["Title"].ToString().Trim();//接收传过来的标题
            string strContent=Request.Form["Content"].ToString().Trim();//接收传过来的内容
            string[] content = strContent.Split(new Char[] {'|'});//对内容进行拆分,并保存到数组
            int upbound = content.Length;//数组的上限
            //SqlServerDataBase db = new SqlServerDataBase();
           // bool success = db.Insert("insert into inNews(Title,Content,FilePath)values('" + st


相关文档:

Html中Document和Event里各种坐标的定义

本文转自:http://hi.baidu.com/gle_el/blog/item/43d0f6f464577a68dcc47431.html
event.x   ,event.y:与触发事件的对象相关的鼠标位置的XY坐标;
offsetTop
获取对象相对于版面或由 offsetParent 属性指定的父坐标的计算顶端位置。
offsetLeft
获取对象相对于版面或由 offsetParent 属性指定的父坐标的计算 ......

JQuery判断HTML元素是否存在

js的方法:
if(document.getElementById('example')) {  
    // do something  
}  
else {  
    // do something else  

jquery的方法:
 
if($('#example').length) {  
    ......

执行JSP后生成HTML静态文件

import java.io.ByteArrayOutputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletContext;
import javax.servlet.Servl ......

常用正则表达式大全!(例如:匹配中文、匹配html)

     匹配中文字符的正则表达式: [u4e00-u9fa5]  
  评注:匹配中文还真是个头疼的事,有了这个表达式就好办了
  匹配双字节字符(包括汉字在内):[^x00-xff]
  评注:可以用来计算字符串的长度(一个双字节字符长度计2,ASCII字符计1)
  匹配空白行的正则表达式:ns* ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号