网页设计师联盟

--- 学习、交流、展示、资源

招聘精英个人求职网站发布网友作品网页特效动画欣赏网页素材免费资源源码下载设计软件
作品欣赏       域名申请       虚拟主机
网页设计师

  • 新闻资讯
  • 网页教程
  • 平面教程
  • 程序设计
  • 视频教程
  • Flash教程

网页设计师站提供网页设计程序设计服务 E-mail:liangfeng0526@qq.com

 您当前的位置:首页 > 阅读文章
网页设计师联盟(www.wysjs.cn)欢迎您!
 标题:

非常简单的一个测试HTML代码的一个特效

<html>
<head>
<title>www.wysjs.cn</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:\\knowsky\\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>
    <br>
    <br>
    <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>
  • (刊登方式:转载   来源:网络   作者:   添加:admin   关键词:)
  • 您已阅读:非常简单的一个测试HTML代码的一个特效 您还可以继续阅读↓  或 回到首页看看>>>
  • 上一篇按钮控制窗口移动 (功能比较丰富)

    <!--把下列代码加到<body>区域中--> <INPUTTYPE="TEXT"size="18"value="这是默认的内容"onfocus="if(value=='这是默认的内容'){value=''}"onblur="if(value==''){value='这是默认的内容'}">

  • 下一篇网页中有趣的齿轮转动特效(无实际使用价值)

    <HTMLxmlns:v="urn:schemas-microsoft-com:vml"><HEAD><TITLE>网页中有趣的齿轮转动特效</TITLE><METAhttp-equiv=Content-Typecontent="text/html;charset=gb2312"><OBJECTid=VMLRenderclassid=CLSID:10072CEC-8CC..