newdoc.asp
———————————————————-
<%@ language=vbscript %>
<script id=debugdirectives runat=server language=javascript>
// set these to true to enable debugging or tracing
@set @debug=false
@set @trace=false
</script>
<html>
<head>
<meta name=vi60_defaultclientscript content=vbscript>
<meta name="generator" content="microsoft visual studio 6.0">
<script id=clienteventhandlersvbs language=vbscript>
<!–
sub button2_onclick
fo1.textarea1.style.fontfamily=select1.value
end sub
sub button3_onclick
fo1.textarea1.style.fontsize=select2.value
end sub
sub button4_onclick
if button4.value="bold" then
button4.value="un bold"
fo1.textarea1.style.fontweight="bold"
else
button4.value="bold"
fo1.textarea1.style.fontweight="normal"
end if
end sub
sub button5_onclick
if button5.value="italics" then
button5.value="un italics"
fo1.textarea1.style.fontstyle="italic"
else
button5.value="italics"
fo1.textarea1.style.fontstyle="normal"
end if
end sub
sub button6_onclick
window.close
end sub
–>
</script>
</head>
<body>
<font face=arial size=3 color=royalblue><b>asp notepad</b></font>
<%dim x
if request("type")="save" then
x = 1
end if
%>
<object id=object1 progid="scripting.filesystemobject" runat="server"></object>
<table bgcolor=blanchedalmond border=0 cellpadding=1 cellspacing=1
width="100%">
<tr>
<td>
<% if not len(request("doc"))=0 then%>
<font face=arial size=2>document:<b> <%=request.querystring("doc")%></b></font>
<%else%>
<font face=arial size=2>document:<b> untitled</b></font>
<%
end if%>
</td>
</tr>
</table>
<p><select id=select1 name=select1 style="height: 22px; width: 25%">
<option value=times new roman>times new roman</option>
<option value=system>system</option>
<option value=arial>arial</option>
<option value=comic sans ms>comic sans ms</option>
<option value=courier>courier</option>
<option value=courier new>courier new</option>
<option value=verdana>verdana</option>
</select>
<input id=button2 name=button2 type=button value=font>
<select id=select2 name=select2 style="height: 22px; width: 60px">
<option value=8pt>8pt</option>
<option value=9pt>9pt</option>
<option value=10pt selected>10pt</option>
<%for a=11 to 100%>
<option value=<%=a%>pt><%=a%>pt</option>
<%next
%>
</select>
<input id=button3 name=button3 type=button value=size>
<input id=button4 name=button4 type=button value=bold>
<input id=button5 name=button5 type=button value=italics>
<input id=button6 name=button6 type=button value=close window><br><br>
<font face=arial size=1>you will not be questioned on saving the changes</p></font>
<form id=fo1 name=fo1 method=post action=newdoc.asp?type=save&ch=1&doc=<%=request.querystring("doc")%>>
<input id=text1 name=text1 style="height: 24px; width: 80%" value=<%=request.querystring("doc")%>>
<input id=button1 name=button1 style="height: 24px; width: 15%" type=submit value="save file" >
<hr width="100%">
<br>
<textarea id=textarea1 name=textarea1 style="font-family: arial; font-size: 10pt; height: 50%; width:
100%"><%if request("ch")=1 then
response.write request("textarea1")
end if
if len(request("text1"))>0 then
if object1.fileexists(request("text")) then
object1.opentextfile(request("doc")).write request("textarea1")
else
object1.createtextfile (request("text1"),true).write request("textarea1")
end if
end if
if not request.querystring("doc")="" and not request("ch")=1 then
if object1.fileexists(request.querystring("doc")) then
response.write object1.opentextfile(request.querystring("doc")).readall
else
response.write "<????> no document exists <????>"
end if
end if
%>
</textarea>
</form>
<hr width="100%">
</body>
</html>
aspnp.asp
—————————————————————-
<%@ language=vbscript %>
<html>
<head>
<meta name="generator" content="microsoft visual studio 6.0">
<script id=clienteventhandlersjs language=javascript>
<!–
function submit1_onclick() {
if(frm1.file1.value==null)
window.open("newdoc.asp?doc=" + document.frm1.file1.value);
}
function button2_onclick() {
window.close()
}
function new_onclick() {
window.open("newdoc.asp?doc=");
}
//–>
</script>
</head>
<body>
<form name=frm1>
<p align=left><font color=royalblue face=arial><strong>asp
notepad</strong></font></p>
<p align=center>
<input id=file1 name=file1
type=file checked readonly style="height: 22px; left: 55px; top: 16px; width: 100%"><br><br>
<input id=submit1 name=submit1 type=submit value=open style="height: 24px; width: 65px"
language=javascript onclick="return submit1_onclick()"> <input id=new name=new style="height: 24px;
width: 64px" type=submit value=new language=javascript onclick="return new_onclick()">
<input id=button2 name=button2 style="height: 24px; width: 74px" type=button value=exit
language=javascript onclick="return button2_onclick()"></p>
</form>
<p> </p>
<p>
<hr>
<font face=arial size=2><strong>author: </strong><font color=royalblue>sharon
jayaraj<br></font><strong>platform<font color=lightseagreen>:
</font></strong><font color=lightseagreen>win98</font><br><strong>application
used: </strong><font color=orange>interdev</font><font color=lightpink>(for easy
working) </font>and <font color=orange>pws</font><font color=lightpink>(for
testing)</font></font></p>
</body>
</html>
——————–by asp精品屋——————
