Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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 ÊôÐÔÖ¸¶¨µÄ¸¸×ø±êµÄ¼ÆËã ......

JS»ñÈ¡ÍøÒ³ÖÐHTMLÔªËØµÄ¼¸ÖÖ·½·¨·ÖÎö

getElementById getElementsByName getElementsByTagName ´ó¸Å½éÉÜ
getElementById £¬        getElementsByName £¬getElementsByTagName
byidÖ»Êǵõ½µ¥¸ö¶ÔÏó ¡¡¡¡ºóÁ½¸öÊǵõ½¼¯ºÏ£¬
getElementById µÄÓ÷¨
<a id="link1" name="link1" href=http://homepage.yesky.com> ......

Ö´ÐÐ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 ......

XHTMLÓëHTMLÖ®¼äµÄ7¸öÇø±ð

ÀϵϰÌâÁË£¬µ«ÊÇÎÒ»¹ÊÇ´ÓÀ´Ã»ÓÐÕûÀí¹ý¡£ÕâÀïÕûÀíÒ»ÏÂ:
ÔÚXHTMLÖУ¬<html>¡¢<head>¡¢<body>¶¼ÊDZØÐèµÄ±êÇ©¡£
±ØÐëÉèÖÃ<html>±êÇ©µÄxmlnsÊôÐÔ£¬ÇÒÆäֵΪ“http://www.w3.org/1999/xhtml”¡£
ËùÓÐÔªËØ¶¼±ØÐë½áÊø¡£ÈÎºÎÆðʼ±êǩҪôÓÐÒ»¸ö¶ÔÓ¦µÄ½áÊø±êÇ©£¨Èç¹ûËüÊÇÒ»¸öÈÝÆ÷µÄ»°£©£¬ÒªÃ ......

¹ØÓÚHTML´úÂëÖÐACTIONʼþÈçºÎÖ¸¶¨servlet·¾¶

\webapps\test ·¾¶ÏÂThreeParams.html:
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>TreeParams</title>
</head>
<body>
<form method="get" onsubmit="return true" name="form1" action="/test/tp">
<tabl ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ