{"action":"created","comment":{"url":"https://api.github.com/repos/qianxueseng-com/js-projects/pulls/comments/45371591","id":45371591,"diff_hunk":"@@ -0,0 +1,168 @@\n+<!DOCTYPE html>\n+<html lang=\"en\">\n+\n+<head>\n+    <meta charset=\"UTF-8\">\n+    <title>clickableGrid</title>\n+    <style>\n+    * {\n+        margin: 0;\n+        padding: 0;\n+    }\n+    \n+    .box {\n+        width: 450px;\n+        height: 500px;\n+        margin: 100px auto;\n+    }\n+    \n+    h3 {\n+        width: 450px;\n+        height: 35px;\n+        margin-bottom: 15px;\n+        text-align: center;\n+        background-color: #bbada0;\n+        line-height: 35px;\n+        font-size: 14px;\n+        border-radius: 5px;\n+    }\n+    \n+    input {\n+        width: 20px;\n+        height: 20px;\n+        text-align: center;\n+    }\n+    \n+    .boxContent {\n+        display: -webkit-flex;\n+        /* Safari */\n+        display: flex;\n+        width: 450px;\n+        height: 450px;\n+        border: 1px solid #000;\n+        flex-flow: row wrap;\n+        align-content: space-between;\n+    }\n+    \n+    .row {\n+        display: flex;\n+        display: -webkit-flex;\n+        justify-content: space-between;\n+        flex-flow: row nowrap;\n+        flex: 1 1 100%;\n+    }\n+    \n+    .item {\n+        display: flex;\n+        display: -webkit-flex;\n+        justify-content: center;\n+        margin: 5px;\n+        flex: 1;\n+        background: #bbada0;\n+        text-align: center;\n+        list-style: none;\n+        border-radius: 2px;\n+    }\n+    </style>\n+    <script>\n+    window.onload = function() {\n+            var input=document.querySelector(\"input\");\n+            var boxContent = document.querySelector(\".boxContent\");\n+            //输入数字，回车生成相应的方块\n+            input.addEventListener(\"change\", function() {\n+                var value1 = typeof(input.value) == \"string\" ? parseInt(input.value) : input.value\n+                if (typeof(value1) != \"number\" || value1 < 0 || value1 > 11) {\n+                    alert(\"输入有误,请输入1-10之间的数字\");\n+                } else {\n+                    while (hasChild(boxContent)) {\n+                        boxContent.removeChild(boxContent.children[0]);\n+                    }\n+                    var value = input.value\n+                    //利用文档碎片\n+                    var fragment = document.createDocumentFragment();\n+                    for (var i = 0; i < value; i++) {\n+                        var div = document.createElement(\"div\");\n+                        div.className = \"row\"\n+                        fragment.appendChild(div)\n+                        for (var j = 0; j < value; j++) {\n+                            var span = document.createElement(\"span\");\n+                            span.className = \"item\";\n+                            var spantxt = document.createTextNode(i * value + j + 1);\n+                            span.appendChild(spantxt);\n+                            // div.appendChild(span);\n+                            chooseSize(span, value);\n+                            fragment.appendChild(span);","path":"101-clickable-grid/clickableGrid.html","position":94,"original_position":94,"commit_id":"938f917fcd6c733361f3fc7e28510407b6439a10","original_commit_id":"938f917fcd6c733361f3fc7e28510407b6439a10","user":{"login":"shaohua","id":806173,"avatar_url":"https://avatars.githubusercontent.com/u/806173?v=3","gravatar_id":"","url":"https://api.github.com/users/shaohua","html_url":"https://github.com/shaohua","followers_url":"https://api.github.com/users/shaohua/followers","following_url":"https://api.github.com/users/shaohua/following{/other_user}","gists_url":"https://api.github.com/users/shaohua/gists{/gist_id}","starred_url":"https://api.github.com/users/shaohua/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shaohua/subscriptions","organizations_url":"https://api.github.com/users/shaohua/orgs","repos_url":"https://api.github.com/users/shaohua/repos","events_url":"https://api.github.com/users/shaohua/events{/privacy}","received_events_url":"https://api.github.com/users/shaohua/received_events","type":"User","site_admin":false},"body":"div和span到底是什么关系啊？很困惑","created_at":"2015-11-19T17:23:39Z","updated_at":"2015-11-19T17:23:39Z","html_url":"https://github.com/qianxueseng-com/js-projects/pull/25#discussion_r45371591","pull_request_url":"https://api.github.com/repos/qianxueseng-com/js-projects/pulls/25","_links":{"self":{"href":"https://api.github.com/repos/qianxueseng-com/js-projects/pulls/comments/45371591"},"html":{"href":"https://github.com/qianxueseng-com/js-projects/pull/25#discussion_r45371591"},"pull_request":{"href":"https://api.github.com/repos/qianxueseng-com/js-projects/pulls/25"}}},"pull_request":{"url":"https://api.github.com/repos/qianxueseng-com/js-projects/pulls/25","id":51219503,"html_url":"https://github.com/qianxueseng-com/js-projects/pull/25","diff_url":"https://github.com/qianxueseng-com/js-projects/pull/25.diff","patch_url":"https://github.com/qianxueseng-com/js-projects/pull/25.patch","issue_url":"https://api.github.com/repos/qianxueseng-com/js-projects/issues/25","number":25,"state":"open","locked":false,"title":"101","user":{"login":"muzi1102","id":9401791,"avatar_url":"https://avatars.githubusercontent.com/u/9401791?v=3","gravatar_id":"","url":"https://api.github.com/users/muzi1102","html_url":"https://github.com/muzi1102","followers_url":"https://api.github.com/users/muzi1102/followers","following_url":"https://api.github.com/users/muzi1102/following{/other_user}","gists_url":"https://api.github.com/users/muzi1102/gists{/gist_id}","starred_url":"https://api.github.com/users/muzi1102/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/muzi1102/subscriptions","organizations_url":"https://api.github.com/users/muzi1102/orgs","repos_url":"https://api.github.com/users/muzi1102/repos","events_url":"https://api.github.com/users/muzi1102/events{/privacy}","received_events_url":"https://api.github.com/users/muzi1102/received_events","type":"User","site_admin":false},"body":"101 js+flexbox","created_at":"2015-11-19T13:05:23Z","updated_at":"2015-11-19T17:23:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b500ff8828a220abff800cca402f254fbe8dcba4","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/qianxueseng-com/js-projects/pulls/25/commits","review_comments_url":"https://api.github.com/repos/qianxueseng-com/js-projects/pulls/25/comments","review_comment_url":"https://api.github.com/repos/qianxueseng-com/js-projects/pulls/comments{/number}","comments_url":"https://api.github.com/repos/qianxueseng-com/js-projects/issues/25/comments","statuses_url":"https://api.github.com/repos/qianxueseng-com/js-projects/statuses/938f917fcd6c733361f3fc7e28510407b6439a10","head":{"label":"muzi1102:master","ref":"master","sha":"938f917fcd6c733361f3fc7e28510407b6439a10","user":{"login":"muzi1102","id":9401791,"avatar_url":"https://avatars.githubusercontent.com/u/9401791?v=3","gravatar_id":"","url":"https://api.github.com/users/muzi1102","html_url":"https://github.com/muzi1102","followers_url":"https://api.github.com/users/muzi1102/followers","following_url":"https://api.github.com/users/muzi1102/following{/other_user}","gists_url":"https://api.github.com/users/muzi1102/gists{/gist_id}","starred_url":"https://api.github.com/users/muzi1102/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/muzi1102/subscriptions","organizations_url":"https://api.github.com/users/muzi1102/orgs","repos_url":"https://api.github.com/users/muzi1102/repos","events_url":"https://api.github.com/users/muzi1102/events{/privacy}","received_events_url":"https://api.github.com/users/muzi1102/received_events","type":"User","site_admin":false},"repo":{"id":46414915,"name":"js-projects","full_name":"muzi1102/js-projects","owner":{"login":"muzi1102","id":9401791,"avatar_url":"https://avatars.githubusercontent.com/u/9401791?v=3","gravatar_id":"","url":"https://api.github.com/users/muzi1102","html_url":"https://github.com/muzi1102","followers_url":"https://api.github.com/users/muzi1102/followers","following_url":"https://api.github.com/users/muzi1102/following{/other_user}","gists_url":"https://api.github.com/users/muzi1102/gists{/gist_id}","starred_url":"https://api.github.com/users/muzi1102/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/muzi1102/subscriptions","organizations_url":"https://api.github.com/users/muzi1102/orgs","repos_url":"https://api.github.com/users/muzi1102/repos","events_url":"https://api.github.com/users/muzi1102/events{/privacy}","received_events_url":"https://api.github.com/users/muzi1102/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/muzi1102/js-projects","description":"javascript projects","fork":true,"url":"https://api.github.com/repos/muzi1102/js-projects","forks_url":"https://api.github.com/repos/muzi1102/js-projects/forks","keys_url":"https://api.github.com/repos/muzi1102/js-projects/keys{/key_id}","collaborators_url":"https://api.github.com/repos/muzi1102/js-projects/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/muzi1102/js-projects/teams","hooks_url":"https://api.github.com/repos/muzi1102/js-projects/hooks","issue_events_url":"https://api.github.com/repos/muzi1102/js-projects/issues/events{/number}","events_url":"https://api.github.com/repos/muzi1102/js-projects/events","assignees_url":"https://api.github.com/repos/muzi1102/js-projects/assignees{/user}","branches_url":"https://api.github.com/repos/muzi1102/js-projects/branches{/branch}","tags_url":"https://api.github.com/repos/muzi1102/js-projects/tags","blobs_url":"https://api.github.com/repos/muzi1102/js-projects/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/muzi1102/js-projects/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/muzi1102/js-projects/git/refs{/sha}","trees_url":"https://api.github.com/repos/muzi1102/js-projects/git/trees{/sha}","statuses_url":"https://api.github.com/repos/muzi1102/js-projects/statuses/{sha}","languages_url":"https://api.github.com/repos/muzi1102/js-projects/languages","stargazers_url":"https://api.github.com/repos/muzi1102/js-projects/stargazers","contributors_url":"https://api.github.com/repos/muzi1102/js-projects/contributors","subscribers_url":"https://api.github.com/repos/muzi1102/js-projects/subscribers","subscription_url":"https://api.github.com/repos/muzi1102/js-projects/subscription","commits_url":"https://api.github.com/repos/muzi1102/js-projects/commits{/sha}","git_commits_url":"https://api.github.com/repos/muzi1102/js-projects/git/commits{/sha}","comments_url":"https://api.github.com/repos/muzi1102/js-projects/comments{/number}","issue_comment_url":"https://api.github.com/repos/muzi1102/js-projects/issues/comments{/number}","contents_url":"https://api.github.com/repos/muzi1102/js-projects/contents/{+path}","compare_url":"https://api.github.com/repos/muzi1102/js-projects/compare/{base}...{head}","merges_url":"https://api.github.com/repos/muzi1102/js-projects/merges","archive_url":"https://api.github.com/repos/muzi1102/js-projects/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/muzi1102/js-projects/downloads","issues_url":"https://api.github.com/repos/muzi1102/js-projects/issues{/number}","pulls_url":"https://api.github.com/repos/muzi1102/js-projects/pulls{/number}","milestones_url":"https://api.github.com/repos/muzi1102/js-projects/milestones{/number}","notifications_url":"https://api.github.com/repos/muzi1102/js-projects/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/muzi1102/js-projects/labels{/name}","releases_url":"https://api.github.com/repos/muzi1102/js-projects/releases{/id}","created_at":"2015-11-18T11:38:57Z","updated_at":"2015-11-19T12:59:51Z","pushed_at":"2015-11-19T12:59:50Z","git_url":"git://github.com/muzi1102/js-projects.git","ssh_url":"git@github.com:muzi1102/js-projects.git","clone_url":"https://github.com/muzi1102/js-projects.git","svn_url":"https://github.com/muzi1102/js-projects","homepage":null,"size":14,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"qianxueseng-com:master","ref":"master","sha":"b81377efe23fcac592220361e662a8705c79da58","user":{"login":"qianxueseng-com","id":14791319,"avatar_url":"https://avatars.githubusercontent.com/u/14791319?v=3","gravatar_id":"","url":"https://api.github.com/users/qianxueseng-com","html_url":"https://github.com/qianxueseng-com","followers_url":"https://api.github.com/users/qianxueseng-com/followers","following_url":"https://api.github.com/users/qianxueseng-com/following{/other_user}","gists_url":"https://api.github.com/users/qianxueseng-com/gists{/gist_id}","starred_url":"https://api.github.com/users/qianxueseng-com/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qianxueseng-com/subscriptions","organizations_url":"https://api.github.com/users/qianxueseng-com/orgs","repos_url":"https://api.github.com/users/qianxueseng-com/repos","events_url":"https://api.github.com/users/qianxueseng-com/events{/privacy}","received_events_url":"https://api.github.com/users/qianxueseng-com/received_events","type":"Organization","site_admin":false},"repo":{"id":42985077,"name":"js-projects","full_name":"qianxueseng-com/js-projects","owner":{"login":"qianxueseng-com","id":14791319,"avatar_url":"https://avatars.githubusercontent.com/u/14791319?v=3","gravatar_id":"","url":"https://api.github.com/users/qianxueseng-com","html_url":"https://github.com/qianxueseng-com","followers_url":"https://api.github.com/users/qianxueseng-com/followers","following_url":"https://api.github.com/users/qianxueseng-com/following{/other_user}","gists_url":"https://api.github.com/users/qianxueseng-com/gists{/gist_id}","starred_url":"https://api.github.com/users/qianxueseng-com/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qianxueseng-com/subscriptions","organizations_url":"https://api.github.com/users/qianxueseng-com/orgs","repos_url":"https://api.github.com/users/qianxueseng-com/repos","events_url":"https://api.github.com/users/qianxueseng-com/events{/privacy}","received_events_url":"https://api.github.com/users/qianxueseng-com/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/qianxueseng-com/js-projects","description":"javascript projects","fork":false,"url":"https://api.github.com/repos/qianxueseng-com/js-projects","forks_url":"https://api.github.com/repos/qianxueseng-com/js-projects/forks","keys_url":"https://api.github.com/repos/qianxueseng-com/js-projects/keys{/key_id}","collaborators_url":"https://api.github.com/repos/qianxueseng-com/js-projects/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/qianxueseng-com/js-projects/teams","hooks_url":"https://api.github.com/repos/qianxueseng-com/js-projects/hooks","issue_events_url":"https://api.github.com/repos/qianxueseng-com/js-projects/issues/events{/number}","events_url":"https://api.github.com/repos/qianxueseng-com/js-projects/events","assignees_url":"https://api.github.com/repos/qianxueseng-com/js-projects/assignees{/user}","branches_url":"https://api.github.com/repos/qianxueseng-com/js-projects/branches{/branch}","tags_url":"https://api.github.com/repos/qianxueseng-com/js-projects/tags","blobs_url":"https://api.github.com/repos/qianxueseng-com/js-projects/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/qianxueseng-com/js-projects/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/qianxueseng-com/js-projects/git/refs{/sha}","trees_url":"https://api.github.com/repos/qianxueseng-com/js-projects/git/trees{/sha}","statuses_url":"https://api.github.com/repos/qianxueseng-com/js-projects/statuses/{sha}","languages_url":"https://api.github.com/repos/qianxueseng-com/js-projects/languages","stargazers_url":"https://api.github.com/repos/qianxueseng-com/js-projects/stargazers","contributors_url":"https://api.github.com/repos/qianxueseng-com/js-projects/contributors","subscribers_url":"https://api.github.com/repos/qianxueseng-com/js-projects/subscribers","subscription_url":"https://api.github.com/repos/qianxueseng-com/js-projects/subscription","commits_url":"https://api.github.com/repos/qianxueseng-com/js-projects/commits{/sha}","git_commits_url":"https://api.github.com/repos/qianxueseng-com/js-projects/git/commits{/sha}","comments_url":"https://api.github.com/repos/qianxueseng-com/js-projects/comments{/number}","issue_comment_url":"https://api.github.com/repos/qianxueseng-com/js-projects/issues/comments{/number}","contents_url":"https://api.github.com/repos/qianxueseng-com/js-projects/contents/{+path}","compare_url":"https://api.github.com/repos/qianxueseng-com/js-projects/compare/{base}...{head}","merges_url":"https://api.github.com/repos/qianxueseng-com/js-projects/merges","archive_url":"https://api.github.com/repos/qianxueseng-com/js-projects/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/qianxueseng-com/js-projects/downloads","issues_url":"https://api.github.com/repos/qianxueseng-com/js-projects/issues{/number}","pulls_url":"https://api.github.com/repos/qianxueseng-com/js-projects/pulls{/number}","milestones_url":"https://api.github.com/repos/qianxueseng-com/js-projects/milestones{/number}","notifications_url":"https://api.github.com/repos/qianxueseng-com/js-projects/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/qianxueseng-com/js-projects/labels{/name}","releases_url":"https://api.github.com/repos/qianxueseng-com/js-projects/releases{/id}","created_at":"2015-09-23T07:22:59Z","updated_at":"2015-11-19T12:01:27Z","pushed_at":"2015-11-19T13:16:54Z","git_url":"git://github.com/qianxueseng-com/js-projects.git","ssh_url":"git@github.com:qianxueseng-com/js-projects.git","clone_url":"https://github.com/qianxueseng-com/js-projects.git","svn_url":"https://github.com/qianxueseng-com/js-projects","homepage":null,"size":30055,"stargazers_count":25,"watchers_count":25,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":36,"mirror_url":null,"open_issues_count":19,"forks":36,"open_issues":19,"watchers":25,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/qianxueseng-com/js-projects/pulls/25"},"html":{"href":"https://github.com/qianxueseng-com/js-projects/pull/25"},"issue":{"href":"https://api.github.com/repos/qianxueseng-com/js-projects/issues/25"},"comments":{"href":"https://api.github.com/repos/qianxueseng-com/js-projects/issues/25/comments"},"review_comments":{"href":"https://api.github.com/repos/qianxueseng-com/js-projects/pulls/25/comments"},"review_comment":{"href":"https://api.github.com/repos/qianxueseng-com/js-projects/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/qianxueseng-com/js-projects/pulls/25/commits"},"statuses":{"href":"https://api.github.com/repos/qianxueseng-com/js-projects/statuses/938f917fcd6c733361f3fc7e28510407b6439a10"}}}}