The code debugging of the TextArea box, and the function is very convenient to use, cool _ form effect

Source: Internet
Author: User
Tags setinterval

<HTML>
<HEAD>
<meta http-equiv= ' content-type ' content= ' text/html; charset=gb2312 ' >
<TITLE> the code debugging of the TextArea box, and the function is very convenient to use, cool </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%" > Code description </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= "code Select All" ></font></td>
 <td align=middle width= "17%" ><INPUT onclick = "window.open (' View-source:file:///c:/windows/autoexec.bat ', ' _self ')" Type=button value= use Notepad ></td>
&NBSP;<TD align=middle width= "20%" ><font color= #004080 ><input id=flashit onclick=test () Type=button Value= Debug Run this code name=tryit></font></td>
 <td align=middle width= "21%" ><FONT color=# 004080><input onclick=jm_cc (TXT) Type=button value= copied directly to the Clipboard ></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 ("Please enter code and press Run!"); o Bj.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.flashit
if (flashelement.length==null)
Flashelement[0]=document.all.flashit
function ChangeColor (which) {
if (flashelement[which].style.color== ')
Flashelement[which].style.color= "#FF8040"
Else
Flashelement[which].style.color= ""}
if (flashelement.length==null)
SetInterval ("ChangeColor (0)", 1000)
Else
for (i=0;i<flashelement.length;i++) {
var tempvariable= ' SetInterval ("ChangeColor (' +i+ ')", ' + ' 1000) '
Eval (tempvariable)}}
</SCRIPT>

</BODY></HTML>

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.