¹ØÓÚÔÚ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="Content-Type" content="text/html; charset=utf-8" />
<meta name="robots" content="noindex, nofollow" />
<link href="/sample.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="fckeditor/fckeditor.js" ></script>
<script type="text/javascript">
<!--
// Automatically calculates the editor base path based on the _samples directory.
// This is usefull only for these samples. A real application should use something like this:
// oFCKeditor.BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value.
// var sBasePath = document.location.href.substring(0,document.location.href.lastIndexOf('fckeditor.html')) ;
//
// alert(sBasePath);
var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ;
Ïà¹ØÎĵµ£º
using System.Text.RegularExpressions; //ÒýÈëµÄÃüÃû¿Õ¼ä
ÒÔÏÂΪÒýÓõÄÄÚÈÝ£º
//Çå³ýHTMLº¯Êý
public static string NoHTML(string Htmlstring)
{
//ɾ³ý½Å±¾
Htmlstr ......
³£ÓÃÕýÔò±í´ïʽ´óÈ«£¡£¨ÀýÈ磺ƥÅäÖÐÎÄ¡¢Æ¥Åähtml£©
Æ¥ÅäÖÐÎÄ×Ö·ûµÄÕýÔò±í´ïʽ£º [u4e00-u9fa5]
¡¡¡¡ÆÀ×¢£ºÆ¥ÅäÖÐÎÄ»¹ÕæÊǸöÍ·ÌÛµÄÊ£¬ÓÐÁËÕâ¸ö±í´ïʽ¾ÍºÃ°ìÁË
¡¡¡¡Æ¥ÅäË«×Ö½Ú×Ö·û(°üÀ¨ºº×ÖÔÚÄÚ)£º[^x00-xff]
¡¡¡¡ÆÀ×¢£º¿ÉÒÔÓÃÀ´¼ÆËã×Ö·û´®µÄ³¤¶È£¨Ò»¸öË«×Ö½Ú×Ö·û³¤¶È¼Æ2£¬ASCII×Ö·û¼Æ1£©
¡¡¡¡Æ ......
string tent = this.TextBox_info.Text.Replace("<", "<").Replace(">", ">").Replace(" ", " ").Trim().Replace("\n", "<br/>");
& ......
À´Ô´£ºÍøÂç
headerÎļþ¸ñʽÀࣺ
'gif' => 'image/gif',
'jpg' => 'image/jpeg',
'jpeg' => 'image/jpeg',
'jpe' => 'image/jpeg',
'bmp' => 'image/bmp',
'png' => 'image/png',
'tif' => 'image/tiff',
'tiff' => 'image/tiff',
'pict' => 'image/x-pict',
'pic' => 'i ......
Ò» HTMLµÄ¶¨Òå
HTML£¨HyperText Mark-up Language£©¼´³¬Îı¾±ê¼ÇÓïÑÔ»ò³¬Îı¾Á´½Ó±êʾÓïÑÔ£¬ÊÇÄ¿Ç°ÍøÂçÉÏÓ¦ÓÃ×îΪ¹ã·ºµÄÓïÑÔ£¬Ò²Êǹ¹³ÉÍøÒ³ÎĵµµÄÖ÷ÒªÓïÑÔ¡£HTMLÎı¾ÊÇÓÉHTMLÃüÁî×é³ÉµÄÃèÊöÐÔÎı¾£¬HTMLÃüÁî¿ÉÒÔ˵Ã÷ÎÄ×Ö¡¢Í¼ÐΡ¢¶¯»¡¢ÉùÒô¡¢±í¸ñ¡¢Á´½ÓµÈ¡£HTMLµÄ½á¹¹°üÀ¨Í·²¿£¨Head£©¡¢Ö÷Ì壨Body£©Á½´ó ......