This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function fn(val, name, hour) { | |
| var ampm = (hour > 11) ? "pm" : "am"; | |
| console.log(val[0], name, val[1], hour, ampm, val[2]); | |
| } | |
| var data = { | |
| hour : new Date().getHours(), | |
| name : "solvin" | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!doctype html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="description" content=""> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <title>카카오</title> | |
| <link rel="stylesheet" href="main.less.css"> | |
| </head> | |
| <body> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var ns = {}; | |
| //utility | |
| ns.util = { | |
| sendAjax: function(url, fn) { | |
| const oReq = new XMLHttpRequest(); | |
| oReq.addEventListener("load", function() { | |
| var jsonObj = JSON.parse(oReq.responseText); | |
| fn(jsonObj); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (function(count) { | |
| var resultSet = []; | |
| function getRandom() { | |
| var randomNumber = Math.floor(Math.random()*count)+1; | |
| if(resultSet.indexOf(randomNumber) === -1) { | |
| resultSet.push(randomNumber); | |
| if(resultSet.length < count) getRandom(); | |
| return; | |
| } | |
| getRandom(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function checkargs(a,b,type) { | |
| var checkResult; | |
| if(typeof a !== type || typeof b !== type) return false; | |
| else return; | |
| } | |
| function multiplyDouble(num2,num2) { | |
| var DOUBLE = 2; | |
| var sum = num1 * num2 * 2; | |
| var result = sum * DOUBLE; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [ | |
| {"id" : 23, "name" : "honux", "content" : "오늘의 커피는 왜 항상 맛있지?", "like" : 2, "comment" : ["^^", "i like this"]}, | |
| {"id" : 55, "name" : "nigayo", "content" : "드디어 출근!", "like" : 4, "comment" : ["이직 하셨나봐요? "]}, | |
| {"id" : 93, "name" : "jk", "content" : "어제 읽은 책이 아직도 ", "like" : 20, "comment" : ["잠자기 전에 만화책은 금물..", "그게 뭘까?"]}, | |
| {"id" : 4, "name" : "crong", "content" : "코드스쿼드가 정말 좋은 곳일까? 믿을 수가 없다..", "like" : 0, "comment" : ["누가 그러디"]} | |
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| header,nav,section,div,footer,ul,dd {margin:0;padding:0;} | |
| li{list-style: none;} | |
| dt { | |
| font-weight: bold; | |
| font-size: 1.2em; | |
| margin-bottom: 5px; | |
| } | |
| dl { | |
| float: left; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!doctype html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <title>1.html</title> | |
| <style> | |
| section{margin:50px}section ul{width:450px;margin:0 auto;overflow:hidden}section ul li{list-style:none;width:100px;height:100px;border:1px solid gray;line-height:100px;text-align:center;margin-right:5px;float:left}section ul li:nth-child(2){cursor:pointer}.log{width:100px;margin:0 auto}.log button{height:30px;width:100%;font-size:1em}.board{font-size:1.5em;font-weight:700;text-align:center;margin-top:10px} | |
| </style> | |
| </head> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!doctype html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <title>1.html</title> | |
| <style> | |
| section{margin:50px}section ul{width:450px;margin:0 auto;overflow:hidden}section ul li{list-style:none;width:100px;height:100px;border:1px solid gray;line-height:100px;text-align:center;margin-right:5px;float:left}section ul li:nth-child(2){cursor:pointer}.log{width:100px;margin:0 auto}.log button{height:30px;width:100%;font-size:1em}.board{font-size:1.5em;font-weight:700;text-align:center;margin-top:10px} | |
| </style> | |
| </head> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!doctype html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <title>1.html</title> | |
| <style> | |
| section{margin:50px}section ul{width:450px;margin:0 auto;overflow:hidden}section ul li{list-style:none;width:100px;height:100px;border:1px solid gray;line-height:100px;text-align:center;margin-right:5px;float:left}section ul li:nth-child(2){cursor:pointer}.log{width:100px;margin:0 auto}.log button{height:30px;width:100%;font-size:1em}.board{font-size:1.5em;font-weight:700;text-align:center;margin-top:10px} | |
| </style> | |
| </head> |