html代码|在线运行代码(在线html代码运行器)

时间:2021-11-06 00:08:12   阅读:1043
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>在线运行代码</title>
<meta name="keywords" content="运行,剪切,粘贴,打印,刷新,清空,另存,运行代码,粘贴代码,清空代码,另存代码,粘贴内容,清空内容,另存内容,代码运行特效大全">
<meta name="description" content="代码运行特效大全。">
</head>
<body>
<div align=center>
<script language=Jscript>
function run(obj){
if (f1.code.value==''||f1.code.value==' '){
alert("代码不能空!");obj.focus()}
else{
var winEx = window.open("", "winEx", "width=400,height=300,resizable=yes,top=0,left=0");
winEx.document.write(f1.code.value);winEx.document.close()}}
function Jia(){
document.f1.code.rows+=parseFloat(f1.h1.value)}
function Jian(ob){
if (ob.rows>3) document.f1.code.rows-=parseInt(f1.h1.value);
else alert('已接近最小值')}
function Exec(obj,cmd){
obj.select();document.execCommand(cmd)}
function Paste(obj){
obj.focus();document.execCommand('paste')}
function Exe(cmd){
document.execCommand(cmd)}
function view(){
window.location="view-source:"+window.location.href}
</script><style>body{
color:#063;font-family:arial;font-size:12}
a:link {text-decoration: none;}
a:visited {text-decoration: none;}
a:hover {text-decoration: underline;}
textarea{
border:1 solid #000;font-family:arial;font-size:12;width:860px;color:#257200;margin:5 0}
</style>
<form name=f1>
<input type=button value='↓' onclick=Jia(code)>
<select onchange="h1.value=this.options[this.selectedIndex].value">
<option value=1>1</option><option value=2>2</option><option value=3>3</option></select>
<input type=button value='↑' onclick=Jian(code)>
<input type=button value='拷贝' onclick=Exec(code,'Copy')>
<input type=button value='剪切' onclick=Exec(code,'Cut')>
<input type=button value='粘贴' onclick=Paste(code)>
<input type=button value='清空' onclick=Exec(code,'Delete')>
<input type=button value='查看' onClick=view()>
<input type=button value='打印' onclick=Exe('print')>
<input type=button value='另存' onclick=Exe('SaveAs')>
<input type=button value='刷新' onclick=Exe('ReFresh')>
<input type=button value='打开' onclick=Exe('Open')>
<input value=1 name=h1 type=hidden><input name=h2 type=button>
<input type=button value=运行' onclick=run(code)>
<textarea name=code rows="20">这是演示代码http://www.zshao.vip!!<br /><embed src="https://sharefs.ali.kugou.com/202111060902/08640a548db3d6f510ec97b272dc0898/KGTX/CLTX001/ec2f249e4cca0cf59f660876c54bec1f.mp3"
width="500" height="50" autostart=false></embed></textarea></form>
<script>function show(){
var t=new Date();var h=t.getHours();var m=t.getMinutes();
var s=t.getSeconds();if(h<10)h="0"+h;if(m<10)m="0"+m;if(s<10)s="0"+s;
document.f1.h2.value=h+":"+m+":"+s;setTimeout("show()","1000")}show()
</script>
<p>&nbsp;&nbsp;您现在的位置:&nbsp;<a href="https://www.zshao.vip">首页</a>=><a href="http://www.zshao.vip/post/2563.html">代码运行特效</a></p>
<p style=font-size:16px;><font color="#ff0000">请尊重他人劳动成果,转载自觉注明出处!<br />注:此代码仅供学习交流,请勿用于商业用途!</font></p>
<br>
<script type="text/javascript">
function shut(){
window.opener=null;
window.open('','_self');
window.close();
}
</script>
<input type="button" name="Submit2" value="关闭窗口" title="关闭窗口" onclick="shut()"/>
</div>
</body>
</html>


html代码|在线运行代码(在线html代码运行器)

上一篇:CMS采集资源站网址合集(cms采集资源站网址合集是什么)

下一篇:css代码|简单快捷美化按钮(button css美化)

网友评论