Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource


Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource


Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.


Auto Save

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.


                <script src="//"></script>
<div id="fre_table_label_20160627">
  <div>請輸入資料來源 (資料變更即輸出表格)</div>
<textarea id="fre_table_20160627"></textarea>  
  <div style="text-align:center;">
    <button type="button">輸入預設資料</button>
<table id="output_20160627" border="1">
<div style="clear:both"></div>


                #fre_table_label_20160627 {
  width: 30%;
#fre_table_20160627 {
  width: 90%;
  height: 20em;


                $(function () {
  $("#fre_table_20160627").change(function () {
    var _lines = $.trim(this.value).split("\n");
    var _list = {};
    for (var _i = 0; _i < _lines.length; _i++) {
        var _line = $.trim(_lines[_i]);
        if (typeof(_list[_line]) === "undefined") {
            _list[_line] = 1;
        else {
            _list[_line] = _list[_line] + 1;

    var _sortable = [];
    for (var _item in _list) {
          _sortable.push([_item, _list[_item]])
        function(a, b) {
            return b[1] - a[1]
    // 然後輸出表格
    var _tbody = $("#output_20160627 tbody");
    for (_i = 0; _i < _sortable.length; _i++) {
        var _item = _sortable[_i][0];
        var _count = _sortable[_i][1];
        var _tr = $("<tr></tr>").appendTo(_tbody);
        $('<td>' + _item + '</td>').appendTo(_tr);
        $('<td>' + _count + '</td>').appendTo(_tr);
  $("#fre_table_label_20160627 button").click(function () {