自己寫的html編輯器
系統(tǒng)
1741 0
文件夾 edithtml (包含6個文件)
inputtool.html
<
style
>
...
body
{...}
{
margin
:
0px
;
font-size
:
12px
;
}
.lv_edithtml_title
{...}
{
background-color
:
#F7F8FD
;
}
.ico
{...}
{
border
:
1pxsolid#fff
;
cursor
:
hand
;
}
.ico_m
{...}
{
border
:
1pxsolid#000
;
cursor
:
hand
;
}
</
style
>
<
div
class
="lv_edithtml_title"
>
<
img
class
="ico"
src
="edithtml_include/images/bold.gif"
alt
="粗體"
onClick
="format('Bold','');"
onMouseOut
="this.className='ico';"
onMouseOver
="this.className='ico_m';"
/>
<
img
class
="ico"
src
="edithtml_include/images/italic.gif"
alt
="斜體"
onClick
="format('Italic','');"
onMouseOut
="this.className='ico';"
onMouseOver
="this.className='ico_m';"
/>
<
img
class
="ico"
src
="edithtml_include/images/underline.gif"
alt
="下劃線"
onClick
="format('Underline','');"
onMouseOut
="this.className='ico';"
onMouseOver
="this.className='ico_m';"
/>
<
img
class
="ico"
src
="edithtml_include/images/fgcolor.gif"
alt
="設(shè)置字體顏色"
onClick
="insert('color');"
onMouseOut
="this.className='ico';"
onMouseOver
="this.className='ico_m';"
/>
<
img
class
="ico"
src
="edithtml_include/images/aleft.gif"
alt
="格式居左"
onClick
="format('justifyleft','')"
onMouseOut
="this.className='ico';"
onMouseOver
="this.className='ico_m';"
/>
<
img
class
="ico"
src
="edithtml_include/images/center.gif"
alt
="格式居中"
onClick
="format('justifycenter','')"
onMouseOut
="this.className='ico';"
onMouseOver
="this.className='ico_m';"
/>
<
img
class
="ico"
src
="edithtml_include/images/aright.gif"
alt
="格式居右"
onClick
="format('justifyright','')"
onMouseOut
="this.className='ico';"
onMouseOver
="this.className='ico_m';"
/>
<
img
class
="ico"
src
="edithtml_include/images/copy.gif"
alt
="復(fù)制"
onClick
="format('copy','')"
onMouseOut
="this.className='ico';"
onMouseOver
="this.className='ico_m';"
/>
<
img
class
="ico"
src
="edithtml_include/images/cut.gif"
alt
="剪切"
onClick
="format('cut','')"
onMouseOut
="this.className='ico';"
onMouseOver
="this.className='ico_m';"
/>
<
img
class
="ico"
src
="edithtml_include/images/paste.gif"
alt
="粘貼"
onClick
="format('paste','')"
onMouseOut
="this.className='ico';"
onMouseOver
="this.className='ico_m';"
/>
<
img
class
="ico"
src
="edithtml_include/images/delete.gif"
alt
="刪除"
onClick
="format('delete','')"
onMouseOut
="this.className='ico';"
onMouseOver
="this.className='ico_m';"
/>
<
img
class
="ico"
src
="edithtml_include/images/redo.gif"
alt
="恢復(fù)"
onClick
="format('redo','')"
onMouseOut
="this.className='ico';"
onMouseOver
="this.className='ico_m';"
/>
<
img
class
="ico"
src
="edithtml_include/images/undo.gif"
alt
="撤銷"
onClick
="format('undo','')"
onMouseOut
="this.className='ico';"
onMouseOver
="this.className='ico_m';"
/>
<
img
class
="ico"
src
="edithtml_include/images/wlink.gif"
alt
="插入鏈接"
onClick
="format('CreateLink','');"
onMouseOut
="this.className='ico';"
onMouseOver
="this.className='ico_m';"
/>
<
img
class
="ico"
src
="edithtml_include/images/hr.gif"
alt
="插入水平線"
onClick
="format('InsertHorizontalRule','');"
onMouseOut
="this.className='ico';"
onMouseOver
="this.className='ico_m';"
/>
<
img
class
="ico"
src
="edithtml_include/images/img.gif"
alt
="插入圖片"
onClick
="insert('img');"
onMouseOut
="this.className='ico';"
onMouseOver
="this.className='ico_m';"
/>
<
img
class
="ico"
src
="edithtml_include/images/flash.gif"
alt
="插入動畫"
onClick
="insert('flash');"
onMouseOut
="this.className='ico';"
onMouseOver
="this.className='ico_m';"
/>
<
img
class
="ico"
src
="edithtml_include/images/wmv.gif"
alt
="插入節(jié)目"
onClick
="insert('avi');"
onMouseOut
="this.className='ico';"
onMouseOver
="this.className='ico_m';"
/>
<
br
>
<
select
id
="FontName"
class
="TBGen"
onChange
="format('fontname',this[this.selectedIndex].value);this.selectedIndex=0"
>
<
option
selected
>
字體
</
option
>
<
option
value
="宋體"
>
宋體
</
option
>
<
option
value
="黑體"
>
黑體
</
option
>
<
option
value
="楷體_GB2312"
>
楷體
</
option
>
<
option
value
="仿宋_GB2312"
>
仿宋
</
option
>
<
option
value
="隸書"
>
隸書
</
option
>
<
option
value
="幼圓"
>
幼圓
</
option
>
<
option
value
="Arial"
>
Arial
</
option
>
<
option
value
="ArialBlack"
>
ArialBlack
</
option
>
<
option
value
="ArialNarrow"
>
ArialNarrow
</
option
>
<
option
value
="BrushScriptMT"
>
BrushScriptMT
</
option
>
<
option
value
="CenturyGothic"
>
CenturyGothic
</
option
>
<
option
value
="ComicSansMS"
>
ComicSansMS
</
option
>
<
option
value
="Courier"
>
Courier
</
option
>
<
option
value
="CourierNew"
>
CourierNew
</
option
>
<
option
value
="MSSansSerif"
>
MSSansSerif
</
option
>
<
option
value
="Script"
>
Script
</
option
>
<
option
value
="System"
>
System
</
option
>
<
option
value
="TimesNewRoman"
>
TimesNewRoman
</
option
>
<
option
value
="Verdana"
>
Verdana
</
option
>
<
option
value
="WideLatin"
>
WideLatin
</
option
>
<
option
value
="Wingdings"
>
Wingdings
</
option
>
</
select
>
<
select
id
="FontSize"
class
="TBGen"
onChange
="format('fontsize',this[this.selectedIndex].value);this.selectedIndex=0"
>
<
option
selected
>
字號
</
option
>
<
option
value
="7"
>
一號
</
option
>
<
option
value
="6"
>
二號
</
option
>
<
option
value
="5"
>
三號
</
option
>
<
option
value
="4"
>
四號
</
option
>
<
option
value
="3"
>
五號
</
option
>
<
option
value
="2"
>
六號
</
option
>
<
option
value
="1"
>
七號
</
option
>
</
select
>
</
div
>
編碼轉(zhuǎn)換文件 edithtml.asp
<
%
function
CovHtml(content)
ON
ERROR
RESUME
NEXT
CovHtml
=
content
if
not
isnull
(content)
then
CovHtml
=
replace
(CovHtml,
"
&
"
,
"
&
"
)
CovHtml
=
replace
(CovHtml,
"
<
"
,
"
<
"
)
CovHtml
=
replace
(CovHtml,
"
>
"
,
"
>
"
)
CovHtml
=
replace
(CovHtml,
chr
(
34
),
"
"
"
)
CovHtml
=
replace
(CovHtml,
chr
(
39
),
"
'
"
)
end
if
if
Err.Number
<>
0
then
CovHtml
=
"
CovHtml轉(zhuǎn)換中出錯請聯(lián)系管理員<br>
"
Err.Clear
end
if
endfunction
%
>
js文件 edit.js
自己寫的html編輯器
更多文章、技術(shù)交流、商務(wù)合作、聯(lián)系博主
微信掃碼或搜索:z360901061
微信掃一掃加我為好友
QQ號聯(lián)系: 360901061
您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點擊下面給點支持吧,站長非常感激您!手機微信長按不能支付解決辦法:請將微信支付二維碼保存到相冊,切換到微信,然后點擊微信右上角掃一掃功能,選擇支付二維碼完成支付。
【本文對您有幫助就好】元
評論