用ASP做一个记事本编缉器附源码.docx

上传人:b****9 文档编号:23413084 上传时间:2023-05-16 格式:DOCX 页数:8 大小:15.86KB
下载 相关 举报
用ASP做一个记事本编缉器附源码.docx_第1页
第1页 / 共8页
用ASP做一个记事本编缉器附源码.docx_第2页
第2页 / 共8页
用ASP做一个记事本编缉器附源码.docx_第3页
第3页 / 共8页
用ASP做一个记事本编缉器附源码.docx_第4页
第4页 / 共8页
用ASP做一个记事本编缉器附源码.docx_第5页
第5页 / 共8页
点击查看更多>>
下载资源
资源描述

用ASP做一个记事本编缉器附源码.docx

《用ASP做一个记事本编缉器附源码.docx》由会员分享,可在线阅读,更多相关《用ASP做一个记事本编缉器附源码.docx(8页珍藏版)》请在冰豆网上搜索。

用ASP做一个记事本编缉器附源码.docx

用ASP做一个记事本编缉器附源码

用ASP做一个记事本编缉器(附源码)

newDoc.asp

----------------------------------------------------------

<%@Language=VBScript%>

<SCRIPTid=DebugDirectivesrunat=serverlanguage=javascript>

//Setthesetotruetoenabledebuggingortracing

@set@debug=false

@set@trace=false

</SCRIPT>

<HTML>

<HEAD>

<METAname=VI60_defaultClientScriptcontent=VBScript>

<METANAME="GENERATOR"Content="MicrosoftVisualStudio6.0">

<SCRIPTID=clientEventHandlersVBSLANGUAGE=vbscript>

<!

--

Subbutton2_onclick

fo1.TEXTAREA1.style.fontFamily=select1.value

EndSub

Subbutton3_onclick

fo1.TEXTAREA1.style.fontSize=select2.value

EndSub

Subbutton4_onclick

ifbutton4.value="Bold"then

button4.value="UnBold"

fo1.TEXTAREA1.style.fontWeight="Bold"

else

button4.value="Bold"

fo1.TEXTAREA1.style.fontWeight="normal"

endif

EndSub

Subbutton5_onclick

ifbutton5.value="Italics"then

button5.value="UnItalics"

fo1.TEXTAREA1.style.fontstyle="italic"

else

button5.value="Italics"

fo1.TEXTAREA1.style.fontstyle="normal"

endif

EndSub

Subbutton6_onclick

window.close

EndSub

-->

</SCRIPT>

</HEAD>

<BODY>

<FONTface=arialsize=3color=royalblue><B>ASPNOTEPAD</b></font>

<%dimx

ifRequest("type")="save"then

x=1

endif

%>

<OBJECTid=OBJECT1PROGID="Scripting.FileSystemObject"RUNAT="server"></OBJECT>

<TABLEbgColor=blanchedalmondborder=0cellPadding=1cellSpacing=1

width="100%">

<TR>

<TD>

<%ifnotlen(request("doc"))=0then%>

<Fontface=arialsize=2>Document:

<B><%=Request.querystring("doc")%></B></font>

<%else%>

<Fontface=arialsize=2>Document:

<B>Untitled</B></font>

<%

endif%>

</TD>

</TR>

</TABLE>

<P><SELECTid=select1name=select1style="HEIGHT:

22px;WIDTH:

25%">

<OPTIONvalue='TimesNewRoman'>TimesNewRoman</option>

<OPTIONvalue='System'>System</option>

<OPTIONvalue='Arial'>Arial</option>

<OPTIONvalue='ComicSansMS'>ComicSansMS</option>

<OPTIONvalue='Courier'>Courier</option>

<OPTIONvalue='CourierNew'>CourierNew</option>

<OPTIONvalue='Verdana'>Verdana</option>

</SELECT>

<INPUTid=button2name=button2type=buttonvalue=Font>

<SELECTid=select2name=select2style="HEIGHT:

22px;WIDTH:

60px">

<optionvalue=8pt>8pt</option>

<optionvalue=9pt>9pt</option>

<optionvalue=10ptselected>10pt</option>

<%fora=11to100%>

<optionvalue='<%=a%>pt'><%=a%>pt</option>

<%next

%>

</SELECT>

<INPUTid=button3name=button3type=buttonvalue=Size>

<INPUTid=button4name=button4type=buttonvalue=Bold>

<INPUTid=button5name=button5type=buttonvalue=Italics>

<INPUTid=button6name=button6type=buttonvalue='CloseWindow'><BR><BR>

<fontface=arialsize=1>Youwillnotbequestionedonsavingthechanges</P></font>

<formid=fo1name=fo1method=postaction=newdoc.asp?

type=save&ch=1&doc=<%=Request.QueryString("doc")%>>

<INPUTid=text1name=text1style="HEIGHT:

24px;WIDTH:

80%"value=<%=Request.querystring("doc")%>>

<INPUTid=button1name=button1style="HEIGHT:

24px;WIDTH:

15%"type=submitvalue="SaveFile">

<hrwidth="100%">

<BR>

<TEXTAREAid=TEXTAREA1name=TEXTAREA1style="FONT-family:

arial;FONT-SIZE:

10pt;HEIGHT:

50%;WIDTH:

100%"><%ifrequest("ch")=1then

Response.Writerequest("textarea1")

endif

iflen(request("text1"))>0then

ifOBJECT1.FileExists(Request("text"))then

OBJECT1.OpenTextFile(request("doc")).Writerequest("textarea1")

else

OBJECT1.CreateTextFile(request("text1"),true).WriteRequest("textarea1")

endif

endif

ifnotRequest.QueryString("doc")=""andnotRequest("ch")=1then

ifOBJECT1.FileExists(Request.QueryString("doc"))then

Response.WriteOBJECT1.OpenTextFile(Request.QueryString("doc")).ReadAll

else

Response.Write"<?

?

?

?

>NodocumentExists<?

?

?

?

>"

endif

endif

%>

</TEXTAREA>

</form>

<HRwidth="100%">

</BODY>

</HTML>

aspnp.asp

----------------------------------------------------------------

<%@Language=VBScript%>

<HTML>

<HEAD>

<METANAME="GENERATOR"Content="MicrosoftVisualStudio6.0">

<SCRIPTID=clientEventHandlersJSLANGUAGE=javascript>

<!

--

functionsubmit1_onclick(){

if(frm1.file1.value==null)

window.open("newdoc.asp?

doc="+document.frm1.file1.value);

}

functionbutton2_onclick(){

window.close()

}

functionnew_onclick(){

window.open("newdoc.asp?

doc=");

}

//-->

</SCRIPT>

</HEAD>

<BODY>

<formname=frm1>

<Palign=left><FONTcolor=royalblueface=Arial><STRONG>ASP

NOTEPAD</STRONG></FONT></P>

<Palign=center>

<INPUTid=file1name=file1

type=fileCHECKEDreadOnlystyle="HEIGHT:

22px;LEFT:

55px;TOP:

16px;WIDTH:

100%"><BR><BR>

<INPUTid=submit1name=submit1type=submitvalue=Openstyle="HEIGHT:

24px;WIDTH:

65px"

LANGUAGE=javascriptonclick="returnsubmit1_onclick()"><INPUTid=newname=newstyle="HEIGHT:

24px;

WIDTH:

64px"type=submitvalue=NewLANGUAGE=javascriptonclick="returnnew_onclick()">

<INPUTid=button2name=button2style="HEIGHT:

24px;WIDTH:

74px"type=buttonvalue=Exit

LANGUAGE=javascriptonclick="returnbutton2_onclick()"></P>

</form>

<P></P>

<P>

<HR>

<FONTface=Arialsize=2><STRONG>Author:

</STRONG><FONTcolor=royalblue>Sharon

Jayaraj<BR></FONT><STRONG>Platform<FONTcolor=lightseagreen>:

</FONT></STRONG><FONTcolor=lightseagreen>Win98</FONT><BR><STRONG>Application

Used:

</STRONG><FONTcolor=orange>Interdev</FONT><FONTcolor=lightpink>(foreasy

Working)</FONT>and<FONTcolor=orange>PWS</FONT><FONTcolor=lightpink>(for

testing)</FONT></FONT></P>

</BODY>

</HTML>

资料引用:

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > IT计算机 > 计算机软件及应用

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1