<html>
<head>
<title>測試代碼真方便</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style>
input {border:1px solid #999999;background-color:white;height:18px}
</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.asdf.innerText)
win.document.execCommand('SaveAs','','e:\\myjs\\test.htm')
win.close();
}
function paste()
{asdf.focus()
document.execCommand("Paste")}
</script>
</head>
<body bgcolor="#006699" text="#000000" scroll=auto onload="paste()">
<div align="center">
<p>
<textarea name="textfield" id="asdf" style="width:90%;background-color: black;border:'1px solid #999999';color:white;font-family:Verdana" rows="20" wrap="VIRTUAL">
</textarea>
<input type=button name=Button value=运行代码 onClick=runEx()>
<input type=button name=Button value=粘贴 onClick=paste()>
<input type=button name=Button value=全选 onClick=asdf.select()>
<input type=button name=Button value=清空 onClick="asdf.value=''">
<input type=button onclick="saveFile();" value='保存代碼'>
</div>
</body>
</html>
分享到:
相关推荐
一个用于在线测试HTML代码的网页,可见可得,直接在表单内写代码运行显示结果.适合初学网页HTML代码者。
一个测试网页的代码,查看别的代码,想测试其代码
初学者适用,制作的一个性格测试网页
jsp网页形式,填入数据库驱动类型、url、用户名、密码、sql测试数据库是否正常返回预期结果,更多开源代码资源请关注 https://gitee.com/00fly/effict-side
自己测试的一些代码的小demo
网页CSS简单代码,实现使用CSS代码对网页进行简单布局。
android测试代码,多级页面的框架代码,支付5.0以上系统
html的飞机游戏部分创建代码,有图片的创建、随机生成等
1.30 代码测试页面.htm 1.31 屏幕式左右拉开页面的效果.htm 1.32 下雨的页面.htm 1.33 页面背景颜色渐变.htm 1.34 自动滚屏.htm 1.35 在页面中画点.htm 1.36 页面顶部颜色渐变特效.htm 1.37 页面打开时的...
为网站代码块pre标签增加一个复制代码按钮代码 参考其他比较专业的博客系统,都在代码块上有一个复制代码的按钮。用来快速复制整个代码块的代码。于是我也想给我的博客增加一个这个功能。 注:chrome测试通过。...
div 应用 弹出层 包含页面测试代码 。。
很不错的心理测试网站代码,供学习者使用,练习,参考
一些代码片段,一些简单功能的实现,页面跳转,底部tab的样式设置,标签的使用,时间的绑定,数据的动态获取
第一个小作品用5.30版本 核心框架用了Unity实战 RTS3D即时战略游戏开发 ADSW可以控制屏幕移动 蓝方为本方用鼠标点击控制移动 点击白色的球 出来蓝方坦克 红方为AI 每隔几秒自动生产坦克 自动开火
框架代码,我测试过的框架代码,很好用的,很不错,测试完美.............可以直接假如网页中即可
自己学习用,参考用,也为学习,没什么内容了,请多多指点
QtStackedWidget测试代码,主要是测试页面的切换
Myeclipse测试代码+MySQL+Tomcat 简单的MVC架构代码,网页+数据库
一个方便初学者用于PHP代码 在线测试的工具,可以直接在页面输入PHP代码运行,程序文件夹放在PHP服务器目录下
本人菜鸟,为了做第3方微信扫码登陆,其中涉及微信网页授权,曾经遇到bug{"errcode":40163,"errmsg":code been used,hints:{req_id:8_8OoA0072th3s}},苦恼无比,现已寻解决方法,于是分享。代码为了适应新浪sae,用了...