六狼论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博账号登陆

只需一步,快速开始

搜索
查看: 99|回复: 0

一个测试代码的页面

[复制链接]

升级  7.33%

68

主题

68

主题

68

主题

举人

Rank: 3Rank: 3

积分
222
 楼主| 发表于 2013-2-7 19:20:53 | 显示全部楼层 |阅读模式
<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 >    <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=清空 >        <input type=button  value='保存代碼'>        </div>     </body>    </html>
您需要登录后才可以回帖 登录 | 立即注册 新浪微博账号登陆

本版积分规则

快速回复 返回顶部 返回列表