JavaScript code formatting and Compression

Source: Internet
Author: User

Have you ever had a headache for reading the messy code written by others? Have you ever worried about viewing the BWindow code? Has it ever left or right to reduce the contradiction between JS volume and JS readability? The best way is to have a program for code formatting and code compression. Today, it is written in pure JS, and of course it is open source. due to the rush of writing, there are still some minor bugs. Please pay attention to updates frequently!

</P> <HTML> <HEAD> <TITLE> Format </TITLE> <META content = "MSHTML 6.00.2800.1528" name = GENERATOR> <META content = "" name = Author> <META content = "" name = Keywords> <META content = "" name = Description> </HEAD> <BODY> <TEXTAREA id = code rows = 12 cols = 100>/* This is a class */</P> <P> function xx (num, str) {// specifies var a = num; this. aa = a; this. bb = function () {alert (str);} this. cc = function () {for (var I = 0; I <10; I ++) {document. title = I ;}}; </P> <P> xx. prototype. dd = function () {alert ("d kd") ;}</P> <P> var a = new xx (100, "hello "), B = new xx (0, "ttyp"); if (1> 2) {alert ();} else {alert ("hell ");} </P> <P>. bb (); B. dd (); alert (. aa); </P> <P> Format Compression Classic Microsoft

</Textarea>


[Ctrl + A select all Note: If you need to introduce external Js, You need to refresh it to execute]

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.