Excerpted from runjs
What is RunJS?
RunJS is an online platform for editing and sharing web front-end code such as HTML, Javascript and CSS, with features like live preview, syntax highlighting and code formatting. We offer seven login methods: OSChina, Weibo, qq, github, google, yahoo and hotmail. You only need an account with any one of the seven to click the Login button in the top right corner and start using RunJS right away.

How do I create code on RunJS?
On the RunJS home page you can click the editor to enter the editor interface; after logging in, click the plus sign in the top right of the left sidebar to add code.

What is Fork? How do I fork someone else’s code?
Fork means to branch. If you are familiar with Github, you are probably no stranger to Fork — the Fork here is the same. You can fork someone else’s code by clicking the Fork button in the top right of the code display box on the code detail page, or by clicking the Fork button in the top left of the view-source page. That way you get your own copy of the current code, which you can maintain yourself.

How do I upload resource files such as images, js and css?
On the editor page, you can see the resource files you have uploaded under resource files at the bottom of the left sidebar, and you can upload, delete and insert them here.

How do I use third-party js libraries?
RunJS already provides a large number of common js libraries (you can reference them quickly above the HTML editor). If the library you need is not among them, you can tell us, or upload the file yourself and reference it.

How do I demo an Ajax call in my code?
RunJS provides an Ajax Echo API that makes it easy for users to test Ajax functionality. Click here for detailed usage.

How do I embed RunJS code (gist) on another site?
RunJS offers a small feature called Gist: if you have written your code on RunJS, you can reference that code by adding the following script tag to your own website. The code will be syntax-colored, and you can also choose different theme styles. How to use:
- xxxxxxxx (code identifier): replace it with the code identifier, which can be found in the URL of the code detail page and of the editor page
- yyyy (code type): there are four options (js, css, html, all); customize it as needed.
- zzzzzz (theme style): there are seven theme styles to choose from (default, eclipse, django, emacs, fadetogrey, midnight, rdark); the default is the default style.
Note: all letters in the URL are lowercase. For example, on this page I embed the following code: and it produces the following effect:
Echo Ajax demo : Live demoView source
HTML:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>RunJS</title>
<script class="jqueryform library" src="/js/sandbox/jquery/jquery-1.8.2.min.js" type="text/javascript"></script>
<script class="jqueryform library" src="/js/sandbox/jquery-plugins/jquery.form-2.82.js" type="text/javascript"></script>
</head>
<body>
<div class="white">RunJS echo 测试:</div><br>
<form action="/action/echo/json" method="post" id="form">
<label class="white">参数1:</label><input name="p1"/><br>
<label class="white">参数2:</label><input name="p1"/><br>
<label class="white">参数3:</label><input name="p2"/><br>
<label class="white">参数4:</label><input name="p3"/><br>
<label class="white">参数5:</label><input name="name"/><br>
<input type="submit"/>
</form>
<div id="result" class="white"></div>
</body>
</html>
JavaScript :
$(document).ready(function() {
$("#form").ajaxForm({
success: function(m) {
$("#result").html(m);
}
});
})
CSS :
.white{
color:white;
}
body{
background-color:black;
}

