公
告
:
网页代码测试页面
作者:confusion 日期:2010-07-20
程序代码<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<META content="text/html; charset=gb2312" http-equiv=Content-Type>
<HTML>
<HEAD>
<STYLE>
input { BACKGROUND-COLOR: white; BORDER-BOTTOM: #999999 1px solid; BORDER-LEFT: #999999 1px solid; BORDER-RIGHT: #999999 1px solid; BORDER-TOP: #999999 1px solid; HEIGHT: 18px;}
.myname { font-size: 9pt; color: #000000; text-decoration: none}
.name { font-size: 16pt; color: #000000; font-weight:bold; text-decoration: none}
.texttarea { BACKGROUND-COLOR: black; BORDER-BOTTOM: #999999 1px solid; BORDER-LEFT: #999999 1px solid; BORDER-RIGHT: #999999 1px solid; BORDER-TOP: #999999 1px solid; COLOR: white; FONT-FAMILY: Verdana; WIDTH: 90%; height:550px;}
</STYLE>
<SCRIPT>
function runEx(){
var winEx2 = window.open("", "winEx2", "width=500,height=300,status=yes,menubar=no,scrollbars=yes,resizable=yes"); winEx2.document.open("text/html", "replace");
winEx2.document.write(unescape(event.srcElement.parentElement.children[0].value));
winEx2.document.close();
}
function saveFile()
{
var win=window.open('','','top=10000,left=10000');
win.document.write(document.all.code.innerText)
win.document.execCommand('SaveAs','','mypage.html')
win.close();
}
</SCRIPT>
<META content="MSHTML 5.00.3315.2870" name=GENERATOR>
<title>网页代码测试页面</title>
</HEAD>
<BODY bgColor="#993333" scroll=auto text=#000000>
<DIV align=center>
<P><span class="name">网页代码测试页面</span>
<P>
<TEXTAREA id=code name=textfield rows=20 class="texttarea" wrap=VIRTUAL></TEXTAREA>
<BR>
<BR>
<INPUT name=Button onclick=runEx() type=button value=运行代码> <INPUT name=Button onclick=code.select() type=button value=全选> <INPUT name=Button onClick="code.value=''" type=button value=清空> <INPUT onclick=saveFile(); type=button value=保存代码>
</P>
<P>
<a href="http://www.outschool.net.cn"><span class="myname">踏出校门之后</span></a><span class="myname"> 编写</span>
<BR>
</P>
</DIV>
</BODY>
</HTML>
<META content="text/html; charset=gb2312" http-equiv=Content-Type>
<HTML>
<HEAD>
<STYLE>
input { BACKGROUND-COLOR: white; BORDER-BOTTOM: #999999 1px solid; BORDER-LEFT: #999999 1px solid; BORDER-RIGHT: #999999 1px solid; BORDER-TOP: #999999 1px solid; HEIGHT: 18px;}
.myname { font-size: 9pt; color: #000000; text-decoration: none}
.name { font-size: 16pt; color: #000000; font-weight:bold; text-decoration: none}
.texttarea { BACKGROUND-COLOR: black; BORDER-BOTTOM: #999999 1px solid; BORDER-LEFT: #999999 1px solid; BORDER-RIGHT: #999999 1px solid; BORDER-TOP: #999999 1px solid; COLOR: white; FONT-FAMILY: Verdana; WIDTH: 90%; height:550px;}
</STYLE>
<SCRIPT>
function runEx(){
var winEx2 = window.open("", "winEx2", "width=500,height=300,status=yes,menubar=no,scrollbars=yes,resizable=yes"); winEx2.document.open("text/html", "replace");
winEx2.document.write(unescape(event.srcElement.parentElement.children[0].value));
winEx2.document.close();
}
function saveFile()
{
var win=window.open('','','top=10000,left=10000');
win.document.write(document.all.code.innerText)
win.document.execCommand('SaveAs','','mypage.html')
win.close();
}
</SCRIPT>
<META content="MSHTML 5.00.3315.2870" name=GENERATOR>
<title>网页代码测试页面</title>
</HEAD>
<BODY bgColor="#993333" scroll=auto text=#000000>
<DIV align=center>
<P><span class="name">网页代码测试页面</span>
<P>
<TEXTAREA id=code name=textfield rows=20 class="texttarea" wrap=VIRTUAL></TEXTAREA>
<BR>
<BR>
<INPUT name=Button onclick=runEx() type=button value=运行代码> <INPUT name=Button onclick=code.select() type=button value=全选> <INPUT name=Button onClick="code.value=''" type=button value=清空> <INPUT onclick=saveFile(); type=button value=保存代码>
</P>
<P>
<a href="http://www.outschool.net.cn"><span class="myname">踏出校门之后</span></a><span class="myname"> 编写</span>
<BR>
</P>
</DIV>
</BODY>
</HTML>
评论: 0 | 引用: 0 | 查看次数: 79
发表评论
上一篇
下一篇


文章来自:
Tags: