作家
登录

对textarea框的代码调试,而且功能上使用非常方便,酷

作者: 来源:www.28hudong.com 2013-03-30 04:09:02 阅读 我要评论

<HTML><HEAD><META http-equiv='Content-Type' content='text/html; charset=gb2312'><TITLE>对textarea框的代码调试,而且功能上使用非常方便,酷</TITLE></HEAD><BODY > <SCRIPT>function JM_cc(ob){ob.select();js=ob.createTextRange();js.execCommand("Copy");}</SCRIPT><TABLE cellSpacing=0 cellPadding=0 width="99%" border=0> <TBODY> <TR> <TD align=middle width="100%">代码说明</TD></TR> <TR> <TD align=middle width="100%"></TD></TR></TBODY></TABLE><FORM action=--WEBBOT-SELF---------------- method=post><DIV align=center><CENTER><TEXTAREA name=txt rows=20 cols=65></TEXTAREA></CENTER><BR></DIV><CENTER><TABLE cellSpacing=0 cellPadding=0 border=0> <TBODY> <TR bgColor=#f0fff0> <TD align=middle width="17%"><FONT color=#004080><INPUT onclick=javascript:this.form.txt.focus();this.form.txt.select(); type=button value="代 码 全 选"></FONT></TD> <TD align=middle width="17%"><INPUT onclick="window.open('view-source:file:///C:/windows/autoexec.bat','_self')" type=button value=使用记事本></TD> <TD align=middle width="20%"><FONT color=#004080><INPUT id=flashit onclick=test() type=button value=调试运行本代码 name=tryit></FONT></TD> <TD align=middle width="21%"><FONT color=#004080><INPUT onclick=JM_cc(txt) type=button value=直接复制到剪贴板></FONT></TD> </TR> </TBODY></TABLE><TABLE width="100%"> <DIV align=center> <CENTER></DIV> <TBODY></TBODY></TABLE></CENTER> <SCRIPT language=JavaScript1.2>function MM_findObj(n, d) { //v4.0 var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n]; for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); if(!x && document.getElementById) x=document.getElementById(n); return x;}function test(){obj=MM_findObj('txt');if (obj.value.length<1) {alert("请输入代码后按运行!");obj.focus();}else{var winEx = window.open("", "winEx", "width=400,height=400,status=yes,menubar=yes,scrollbars=yes,resizable=yes"); winEx.document.open("text/html", "replace"); winEx.document.write(obj.value); winEx.document.close();}} if (document.all&&document.all.flashit){var flashelement=document.all.flashitif (flashelement.length==null)flashelement[0]=document.all.flashitfunction changecolor(which){if (flashelement[which].style.color=='')flashelement[which].style.color="#FF8040"elseflashelement[which].style.color=""}if (flashelement.length==null)setInterval("changecolor(0)",1000)elsefor (i=0;i<flashelement.length;i++){var tempvariable='setInterval("changecolor('+i+')",'+'1000)'eval(tempvariable)}}</SCRIPT> </BODY></HTML>

  推荐阅读

  非常好的js代码

控制横向和纵向滚动条的显隐?<body style="overflow-y:hidden"> 去掉x轴<body style="overflow-x:hidden"> 去掉y轴<body scroll="no">不显 表格变色<TD onmouseover="this.style.backgroundColor='#FFFFFF'" o>>>详细阅读


本文标题:对textarea框的代码调试,而且功能上使用非常方便,酷

地址:http://www.17bianji.com/kaifa2/JS/31715.html

关键词: 探索发现

乐购科技部分新闻及文章转载自互联网,供读者交流和学习,若有涉及作者版权等问题请及时与我们联系,以便更正、删除或按规定办理。感谢所有提供资讯的网站,欢迎各类媒体与乐购科技进行文章共享合作。

网友点评
自媒体专栏

评论

热度

精彩导读
栏目ID=71的表不存在(操作类型=0)