TextBox ³¬Á´½ÓÌæ»»³ÉHTML³¬Á´½ÓÐÎʽ
string tent = this.TextBox_info.Text.Replace("<", "<").Replace(">", ">").Replace(" ", " ").Trim().Replace("\n", "<br/>");
Regex regex = new Regex(@"(?:https?://|www\.)(?:[\w-]+\.)+[\w-]+(?:/[\w- ./?%&=]*)?", RegexOptions.ECMAScript);
MatchCollection mc = regex.Matches(tent);
string text = "";
List<string> list = new List<string>();
foreach (Match m in mc)
{
list.Add(m.ToString());
}
for (int i = 0; i < list.Count; i++)
{
for (int j = i + 1; j < list.Count; j++)
{
if (list[i] == list[j])
{
list.Remove(list[j]);
&
Ïà¹ØÎĵµ£º
ÍøÕ¾ÓÅ»¯
³£ÓõÄHTML±êÇ©:
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<body>
<h1>H1±êÇ©£¬¶¨ÒåÎÄÕ±êÌ⣬һ¸öÒ³ÃæÖ»ÒªÒ»¸ö</h1>
<h2>H2±êÇ©£¬¶¨ÒåÎÄÕ±êÌ⣬һ¸öÒ³ÃæÖ»ÒªÒ ......
HTMLÓÐ10¸ö±í¸ñÏà¹Ø±êÇ©¡£ÏÂÃæÊÇÒ»¸ö´øÓмò½éµÄÁÐ±í£¬µ«ÊÇÊ×ÏÈ£¬ÎĵµÒª±»ÕýÈ·µÄ¶¨ÒåÔÚHTML 4.01/XHTML 1»òHTML 5ÏÂÃæ:
<caption> ¶¨Òå±í¸ñ±êÌâ(4, 5)
<col> Ϊ±í¸ñµÄÁж¨ÒåÊôÐÔ(4, 5)
<colgroup> ¶¨Òå±í¸ñÁеķÖ×é(4, 5)
<table> ¶¨Òå±í¸ñ(4, 5)
<tbody> ¶¨Òå±í¸ñÖ÷Ìå(4, 5)
< ......
ѧÎÞÖ¹¾³£¡£¡£¡
½ñÌìÔÚÂÛ̳»Ø´ðÌû×Ó£¬Ñ§µ½ÁËÒ»ÕУ¬selectÔÀ´¿ÉÒÔʹÓÃoptgroup ±êÇ©£¬¶Ôoption½øÐзÖÀ࣡
ÌØÒâ´ÓÍøÉÏժ¼ÁËÏÂÃæµÄÎÄÕÂ...
ÔÚ htmlÀï,optgroupÕâ¸öÔªËØ¶ÔÓÚÎÒÀ´ËµºÜÉÙÓõ½¡£×î½üÔÚ¹«Ë¾×öÏîĿʱʹÓÃÁËһϣ¬¸Ð¾õ²»´í£¬¿ÉÒÔ¶ÔÊý¾Ý½øÐзÖÀà¡£µ«ÔÚʹÓÃJavaScript Ìí¼Óoptgroupʱ,ÔÚIEÓëFire ......
µÚÒ»ÖÖ£º
<script language="javascript" type="text/javascript">
window.location.href="login.jsp?backurl="+window.location.href;
</script>
µÚ¶þÖÖ£º
<script language="javascript">
alert("·µ»Ø");
window.history.back ......