It is very convenient to debug the code in the textarea box.

Source: Internet
Author: User

<HTML>
<HEAD>
<META http-equiv = 'content-type' Content = 'text/html; charset = gb2312 '>
<TITLE> code debugging on the textarea box, which is very convenient to use and cool </TITLE>
</HEAD>
<BODY>

<SCRIPT> function JM_cc (ob ){
Ob.select(;;js=ob.createtextrange(;;js.exe cCommand ("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 = ""> </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>
<TD align = middle width = "20%"> <FONT color = #004080> <INPUT id = flashit onclick = test () type = button value = debug and run this code name = tryit> </FONT> </TD>
<TD align = middle width = "21%"> <FONT color = #004080> <INPUT onclick = JM_cc (txt) type = button value = copy directly to the clipboard> </FONT> </TD>
</TR>
</TBODY> </TABLE>
& Lt; TABLE width = "100%" & gt;
<DIV align = center>
<CENTER> </DIV>
<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%].doc ument; 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 ++) xw.mm_findobj(n,d.layers+ I }.doc ument );
If (! X & document. getElementById) x = document. getElementById (n); return x ;}
Function test (){
Obj = MM_findObj ('txt ');
If (obj. value. length <1) {alert ("Enter the code and press run! "); Obj. focus ();}
Else {
Var winEx = window. open ("", "winEx", "width = 400, height = 400, status = yes, menubar = yes, scrollbars = yes, resizable = yes"); winEx.doc ument. open ("text/html", "replace ");
WinEx.doc ument. write (obj. value );
WinEx.doc ument. 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.